LOCALE_GET_REGION(3) 1 LOCALE_GET_REGION(3)
Locale::getRegion - Gets the region for the input locale
Object oriented style
SYNOPSIS
publicstatic string Locale::getRegion (string $locale)
DESCRIPTION
Procedural style
string locale_get_region (string $locale)
Gets the region for the input locale.
PARAMETERS
o $locale
- The locale to extract the region code from
RETURN VALUES
The region subtag for the locale or NULL if not present
EXAMPLES
Example #1
locale_get_region(3) example
<?php
echo locale_get_region('de-CH-1901');
?>
Example #2
OO example
<?php
echo Locale::getRegion('de-CH-1901');
?>
The above example will output:
CH
SEE ALSO
locale_get_primary_language(3), locale_get_script(3), locale_get_all_variants(3).
PHP Documentation Group LOCALE_GET_REGION(3)