Locale¶
-
php\util\Locale
Class Locale, Immutable
Methods
__construct
($lang, $country = '', $variant = '')¶
Parameters:
- $lang – string
- $country – string
- $variant – string
getLanguage
()¶
Returns: string
getDisplayLanguage
($locale = null)¶
Parameters:
- $locale – php\util\Locale
Returns: string
getCountry
()¶
Returns: string
getDisplayCountry
($locale = null)¶
Parameters:
- $locale – php\util\Locale
Returns: string
getVariant
()¶
Returns: string
getDisplayVariant
($locale = null)¶
Parameters:
- $locale – php\util\Locale
Returns: string
getISO3Country
()¶
Returns: string
getISO3Language
()¶
Returns: string
__toString
()¶Returns a string representation of this Locale object, consisting of language, country, variant, script, and extensions as below:
language + “_” + country + “_” + (variant + “_#” | “#”) + script + “-” + extensions
Returns: string
__clone
()¶private
- static
ENGLISH
¶
Returns: php\util\Locale
- static
US
¶
Returns: php\util\Locale
- static
UK
¶
Returns: php\util\Locale
- static
CANADA
¶
Returns: php\util\Locale
- static
CANADA_FRENCH
¶
Returns: php\util\Locale
- static
FRENCH
¶
Returns: php\util\Locale
- static
FRANCE
¶
Returns: php\util\Locale
- static
ITALIAN
¶
Returns: php\util\Locale
- static
ITALY
¶
Returns: php\util\Locale
- static
GERMAN
¶
Returns: php\util\Locale
- static
GERMANY
¶
Returns: php\util\Locale
- static
JAPAN
¶
Returns: php\util\Locale
- static
JAPANESE
¶
Returns: php\util\Locale
- static
KOREA
¶
Returns: php\util\Locale
- static
KOREAN
¶
Returns: php\util\Locale
- static
CHINA
¶
Returns: php\util\Locale
- static
CHINESE
¶
Returns: php\util\Locale
- static
TAIWAN
¶
Returns: php\util\Locale
- static
RUSSIAN
¶
Returns: php\util\Locale
- static
RUSSIA
¶
Returns: php\util\Locale
- static
ROOT
¶
Returns: php\util\Locale
- static
getDefault
($globally = false)¶Get default locale (if globally = false - only for the current environment)
Parameters:
- $globally – bool
Returns:
- static
setDefault
($locale, $globally = false)¶Set default locale
Parameters:
- $locale – php\util\Locale
- $globally – bool - if
false
- only for the current environment
- static
getAvailableLocales
¶Returns an array of all installed locales. The returned array represents the union of locales supported by the Java runtime environment
Returns: php\util\Locale[] An array of installed locales.