Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

collator_get_locale(3) [php man page]

COLLATOR_GET_LOCALE(3)							 1						    COLLATOR_GET_LOCALE(3)

Collator::getLocale - Get the locale name of the collator

	Object oriented style

SYNOPSIS
public string Collator::getLocale (int $type) DESCRIPTION
Procedural style string collator_get_locale (Collator $coll, int $type) Get collector locale name. PARAMETERS
o $coll -Collator object. o $type - You can choose between valid and actual locale ( Locale::VALID_LOCALE and Locale::ACTUAL_LOCALE, respectively). RETURN VALUES
Real locale name from which the collation data comes. If the collator was instantiated from rules or an error occurred, returns boolean FALSE. EXAMPLES
Example #1 collator_get_locale(3) example <?php $coll = collator_create( 'en_US_California' ); $res_val = collator_get_locale( $coll, Locale::VALID_LOCALE ); $res_act = collator_get_locale( $coll, Locale::ACTUAL_LOCALE ); printf( "Valid locale name: %s Actual locale name: %s ", $res_val, $res_act ); ?> The above example will output: Requested locale name: en_US_California Valid locale name: en_US Actual locale name: en SEE ALSO
collator_create(3). PHP Documentation Group COLLATOR_GET_LOCALE(3)

Check Out this Related Man Page

NUMFMT_GET_LOCALE(3)							 1						      NUMFMT_GET_LOCALE(3)

NumberFormatter::getLocale - Get formatter locale

	Object oriented style

SYNOPSIS
public string NumberFormatter::getLocale ([int $type]) DESCRIPTION
Procedural style string numfmt_get_locale (NumberFormatter $fmt, [int $type]) Get formatter locale name. PARAMETERS
o $fmt -NumberFormatter object. o $type - You can choose between valid and actual locale ( Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE, respectively). The default is the actual locale. RETURN VALUES
The locale name used to create the formatter. EXAMPLES
Example #1 numfmt_get_locale(3) example <?php $req = 'fr_FR_PARIS'; $fmt = numfmt_create( $req, NumberFormatter::DECIMAL); $res_val = numfmt_get_locale( $fmt, Locale::VALID_LOCALE ); $res_act = numfmt_get_locale( $fmt, Locale::ACTUAL_LOCALE ); printf( "Requested locale name: %s Valid locale name: %s Actual locale name: %s ", $req, $res_val, $res_act ); ?> The above example will output: Requested locale name: fr_FR_PARIS Valid locale name: fr_FR Actual locale name: fr SEE ALSO
numfmt_create(3), numfmt_get_error_code(3). PHP Documentation Group NUMFMT_GET_LOCALE(3)
Man Page