downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Spoofchecker> <ResourceBundle::get
[edit] Last updated: Fri, 25 May 2012

view this page in

ResourceBundle::getLocales

resourcebundle_locales

(PHP >= 5.3.2, PECL intl >= 2.0.0)

ResourceBundle::getLocales -- resourcebundle_localesサポートするロケールを取得する

説明

オブジェクト指向型

array ResourceBundle::getLocales ( string $bundlename )

手続き型

array resourcebundle_locales ( string $bundlename )

ResourceBundle 名を指定して、サポートするロケールを取得します。

パラメータ

bundlename

ロケールを取得したい ResourceBundle のパス、あるいは 空文字列を指定するとデフォルトのロケール一覧を取得できます。

返り値

このバンドルがサポートするロケールの一覧を返します。

例1 resourcebundle_locales() の例

<?php
$bundle 
"/user/share/data/myapp";
echo 
join(PHP_EOLresourcebundle_locales($bundle);
?>

上の例の出力は、 たとえば以下のようになります。

es
root

例2 オブジェクト指向の例

<?php
$bundle 
"/usr/share/data/myapp";
$r = new ResourceBundle'es'$bundle);
echo 
join("\n"$r->getLocales($bundle));
?>

上の例の出力は、 たとえば以下のようになります。

es
root

参考



add a note add a note User Contributed Notes ResourceBundle::getLocales
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites