Locale

php\util\Locale

Class Locale, Immutable

Methods


__construct($lang, $country = '', $variant = '')
Параметры:
  • $langstring
  • $countrystring
  • $variantstring
getLanguage()
Результат:string
getDisplayLanguage($locale = null)
Параметры:
Результат:

string

getCountry()
Результат:string
getDisplayCountry($locale = null)
Параметры:
Результат:

string

getVariant()
Результат:string
getDisplayVariant($locale = null)
Параметры:
Результат:

string

getISO3Country()
Результат:string
getISO3Language()
Результат: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

Результат:string
__clone()

private

static ENGLISH
Результат:php\util\Locale
static US
Результат:php\util\Locale
static UK
Результат:php\util\Locale
static CANADA
Результат:php\util\Locale
static CANADA_FRENCH
Результат:php\util\Locale
static FRENCH
Результат:php\util\Locale
static FRANCE
Результат:php\util\Locale
static ITALIAN
Результат:php\util\Locale
static ITALY
Результат:php\util\Locale
static GERMAN
Результат:php\util\Locale
static GERMANY
Результат:php\util\Locale
static JAPAN
Результат:php\util\Locale
static JAPANESE
Результат:php\util\Locale
static KOREA
Результат:php\util\Locale
static KOREAN
Результат:php\util\Locale
static CHINA
Результат:php\util\Locale
static CHINESE
Результат:php\util\Locale
static TAIWAN
Результат:php\util\Locale
static RUSSIAN
Результат:php\util\Locale
static RUSSIA
Результат:php\util\Locale
static ROOT
Результат:php\util\Locale
static getDefault($globally = false)

Get default locale (if globally = false - only for the current environment)

Параметры:
  • $globallybool
Результат:

php\util\Locale

static setDefault($locale, $globally = false)

Set default locale

Параметры:
  • $localephp\util\Locale
  • $globallybool - 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

Результат:php\util\Locale[] An array of installed locales.