|
|
RESOURCEBUNDLE_CREATE(3) 1 RESOURCEBUNDLE_CREATE(3) ResourceBundle::create - Create a resource bundle Object oriented style (method) SYNOPSIS
publicstatic ResourceBundle ResourceBundle::create (string $locale, string $bundlename, [bool $fallback]) DESCRIPTION
Procedural style ResourceBundle resourcebundle_create (string $locale, string $bundlename, [bool $fallback]) Object oriented style (constructor): ResourceBundle::__construct (string $locale, string $bundlename, [bool $fallback]) Creates a resource bundle. PARAMETERS
o $locale - Locale for which the resources should be loaded (locale name, e.g. en_CA). o $bundlename - The directory where the data is stored or the name of the .dat file. o $fallback - Whether locale should match exactly or fallback to parent locale is allowed. RETURN VALUES
Returns ResourceBundle object or NULL on error. EXAMPLES
Example #1 resourcebundle_create(3) example <?php $r = resourcebundle_create( 'es', "/usr/share/data/myapp"); echo $r['teststring']; ?> Example #2 resourcebundle_create(3) example <?php $r = ResourceBundle::create( 'es', "/usr/share/data/myapp"); echo $r['teststring']; ?> The above example will output: iHola, mundo! SEE ALSO
resourcebundle_get(3). PHP Documentation Group RESOURCEBUNDLE_CREATE(3)