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

search for in the

ResourceBundle::getErrorCode> <ResourceBundle::count
[edit] Last updated: Fri, 25 May 2012

view this page in

ResourceBundle::create

resourcebundle_create

ResourceBundle::__construct

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

ResourceBundle::create -- resourcebundle_create -- ResourceBundle::__constructリソースバンドルを作成する

説明

オブジェクト指向型 (メソッド)

static ResourceBundle ResourceBundle::create ( string $locale , string $bundlename [, bool $fallback ] )

手続き型

ResourceBundle resourcebundle_create ( string $locale , string $bundlename [, bool $fallback ] )

オブジェクト指向型 (コンストラクタ)

ResourceBundle::__construct() ( string $locale , string $bundlename [, bool $fallback ] )

リソースバンドルを作成します。

パラメータ

locale

リソースバンドルを読み込むロケール (en_CA などのロケール名)。

bundlename

データが格納されているディレクトリ、あるいは .dat ファイル名。

fallback

ロケールを完全一致とするか、あるいは代替として親ロケールを使うことを許可するか。

返り値

ResourceBundle オブジェクト、あるいはエラー時に FALSE を返します。

例1 resourcebundle_create() の例

<?php
$r 
resourcebundle_create'es'"/usr/share/data/myapp");
echo 
$r['teststring'];
?>

例2 ResourceBundle::create() の例

<?php
$r 
ResourceBundle::create'es'"/usr/share/data/myapp");
echo 
$r['teststring'];
?>

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

¡Hola, mundo!

参考



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

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