NumberFormatter::getLocale
numfmt_get_locale
(No version information available, might be only in CVS)
NumberFormatter::getLocale -- numfmt_get_locale — フォーマッタのロケールを取得する
説明
オブジェクト指向型
string
NumberFormatter::getLocale
([ 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( $fmt, Locale::VALID_LOCALE );
$res_act = numfmt_get_locale( $fmt, Locale::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::getLocale
There are no user contributed notes for this page.
