Locale::getDisplayVariant
locale_get_display_variant
(No version information available, might be only in CVS)
Locale::getDisplayVariant -- locale_get_display_variant — 入力ロケールの変化形の表示名を、適切に地域化して返す
説明
オブジェクト指向型
static
string
Locale::getDisplayVariant
( string $locale
[, string $in_locale
] )
手続き型
string
locale_get_display_variant
( string $locale
[, string $in_locale
] )
入力ロケールの変化形の表示名を、適切に地域化して返します。 NULL の場合はデフォルトのロケールを使用します。
パラメータ
- locale
-
表示変化形を返したいロケール。
- in_locale
-
オプションのフォーマットロケール。 変化形の表示に使用します。
返り値
$locale に対応する変化形の表示名を、 $in_locale にあわせた形式で返します。
例
例1 locale_get_display_variant() の例
<?php
echo locale_get_display_variant('sl-Latn-IT-nedis', 'en');
echo ";\n";
echo locale_get_display_variant('sl-Latn-IT-nedis', 'fr');
echo ";\n";
echo locale_get_display_variant('sl-Latn-IT-nedis', 'de');
?>
例2 オブジェクト指向の例
<?php
echo Locale::getDisplayVariant('sl-Latn-IT-nedis', 'en');
echo ";\n";
echo Locale::getDisplayVariant('sl-Latn-IT-nedis', 'fr');
echo ";\n";
echo Locale::getDisplayVariant('sl-Latn-IT-nedis', 'de');
?>
上の例の出力は以下となります。
Natisone dialect; dialecte de Natisone; NEDIS
Locale::getDisplayVariant
There are no user contributed notes for this page.
