Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

resourcebundle(3) [php 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)

Check Out this Related Man Page

RESOURCEBUNDLE_GET_ERROR_CODE(3)					 1					  RESOURCEBUNDLE_GET_ERROR_CODE(3)

ResourceBundle::getErrorCode - Get bundle's last error code.

	Object oriented style

SYNOPSIS
public int ResourceBundle::getErrorCode (void ) DESCRIPTION
Procedural style int resourcebundle_get_error_code (ResourceBundle $r) Get error code from the last function performed by the bundle object. PARAMETERS
o $r -ResourceBundle object. RETURN VALUES
Returns error code from last bundle object call. EXAMPLES
Example #1 resourcebundle_get_error_code(3) example <?php $r = resourcebundle_create( 'es', "/usr/share/data/myapp"); echo $r['somestring']; if(intl_is_failure(resourcebundle_get_error_code($r))) { report_error("Bundle error"); } ?> Example #2 OO example <?php $r = new ResourceBundle( 'es', "/usr/share/data/myapp"); echo $r['somestring']; if(intl_is_failure(ResourceBundle::getErrorCode($r))) { report_error("Bundle error"); } ?> SEE ALSO
resourcebundle_get_error_message(3), intl_get_error_code(3), intl_is_failure(3). PHP Documentation Group RESOURCEBUNDLE_GET_ERROR_CODE(3)
Man Page

3 More Discussions You Might Find Interesting

1. Linux

ICU Java

Collegues Rendering of my language in Java is not proper. I have created a patch for ICU. How can I integrate the patch to Jdk1.5.0_09 or Jre. Which .so file I have to replace for it . With warm regards jaganadh.G (0 Replies)
Discussion started by: jaganadh
0 Replies

2. Shell Programming and Scripting

How to load different type of data in a file to two arrays

Hi, I have tried to find some sort of previous similar thread on this but not quite close to what I want to achieve. Basically I have two class of data in my file..e.g 1,1,1,1,1,2,yes 1,2,3,4,5,5,yes 2,3,4,5,5,5,no 1,2,3,4,4,2,no 1,1,3,4,5,2,no I wanted to read the "yes" entry to an... (5 Replies)
Discussion started by: ahjiefreak
5 Replies

3. Red Hat

ICU resource bundling on Linux: error faced while using Key more than 15 chars

Hi, I am trying to use ICU resource bundle on Unix and created a resource bundle "root.res" from the following file. root { abcdefghijklmnop { "16 character key" } abcdefghijklmno { "15 character key" } abcdefghijklmn { "14 character key" } abcdefghijklm12 { "13 C... (0 Replies)
Discussion started by: prashant_jindal
0 Replies