Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

resourcebundle_create(3) [php man page]

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)

Check Out this Related Man Page

RESOURCEBUNDLE(3)							 1							 RESOURCEBUNDLE(3)

The ResourceBundle class

INTRODUCTION
Localized software products often require sets of data that are to be customized depending on current locale, e.g.: messages, labels, for- matting patterns. ICU resource mechanism allows to define sets of resources that the application can load on locale basis, while accessing them in unified locale-independent fashion. This class implements access to ICU resource data files. These files are binary data arrays which ICU uses to store the localized data. ICU resource bundle can hold simple resources and complex resources. Complex resources are containers which can be either integer-indexed or string-indexed (just like PHP arrays). Simple resources can be of the following types: string, integer, binary data field or integer array. ResourceBundle supports direct access to the data through array access pattern and iteration via foreach, as well as access via class meth- ods. The result will be PHP value for simple resources and ResourceBundle object for complex ones. All resources are read-only. CLASS SYNOPSIS
ResourceBundle ResourceBundle Methods o public ResourceBundle::__construct (string $locale, string $bundlename, [bool $fallback]) o public int ResourceBundle::count (void ) o publicstatic ResourceBundle ResourceBundle::create (string $locale, string $bundlename, [bool $fallback]) o public int ResourceBundle::getErrorCode (void ) o public string ResourceBundle::getErrorMessage (void ) o public mixed ResourceBundle::get (string|int $index) o public array ResourceBundle::getLocales (string $bundlename) SEE ALSO
o ICU Resource Management oICU Data PHP Documentation Group RESOURCEBUNDLE(3)
Man Page