NumberFormatter
PHP Manual

NumberFormatter::getLocale

numfmt_get_locale

(No version information available, might be only in CVS)

NumberFormatter::getLocale -- numfmt_get_localeフォーマッタのロケールを取得する

説明

オブジェクト指向型

string NumberFormatter::getLocale ([ integer $type ] )

手続き型

string numfmt_get_locale ( NumberFormatter $fmt [, integer $type ] )

フォーマッタのロケール名を取得します。

パラメータ

fmt

NumberFormatter オブジェクト。

type

妥当なロケールあるいは正確なロケールのいずれか ( Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE, respectively) を選択します。デフォルトは実際のロケールです。

返り値

フォーマッタの作成時に使用したロケールを返します。

例1 numfmt_get_locale() の例

<?php
$req     
'fr_FR_PARIS';
$fmt     numfmt_create$req,  NumberFormatter::DECIMAL);
$res_val numfmt_get_locale$fmtLocale::VALID_LOCALE );
$res_act numfmt_get_locale$fmtLocale::ACTUAL_LOCALE );
printf"Requested locale name: %s\nValid locale name: %s\nActual locale name: %s\n",
         
$req$res_val$res_act );
?>

上の例の出力は以下となります。

Requested locale name: fr_FR_PARIS
Valid locale name: fr_FR
Actual locale name: fr

参考


NumberFormatter
PHP Manual
[お役立ちリンク集]

NPO法人の設立(東京・大阪) 東京や大阪などNPO法人を設立する場合の注意点等を紹介

不動産・賃貸・マンション 不動産・賃貸・マンションに関する用語集です。

堺市の入院・内科

大阪の賃貸探し 大阪で賃貸を探している方は大阪ホームへ

東京の賃貸マンション 東京で賃貸を探すなら東京賃貸.orgへ