LocaleInterface
interface LocaleInterface (View source)
Methods
Get the locale record identifier.
Get the language code.
Get the Country/territory code.
Get the full code of this locale.
Get the number of plural rules used in this locale.
Get the plural rule names with examples (using CLDR format).
Get the plural rules definition of this locale (using gettext format).
Set the number of plural rules used in this locale.
Set the plural rule names with examples (using CLDR format).
Set the plural rules definition of this locale (using gettext format).
Get the display name of this locale.
Details
int|null
getLocaleID()
Get the locale record identifier.
string
getLanguage()
Get the language code.
string
getCountry()
Get the Country/territory code.
string
getLocale()
Get the full code of this locale.
int
getNumPlurals()
Get the number of plural rules used in this locale.
array
getPluralCases()
Get the plural rule names with examples (using CLDR format).
string
getPluralRule()
Get the plural rules definition of this locale (using gettext format).
setNumPlurals(mixed $numPlurals)
Set the number of plural rules used in this locale.
setPluralCases(mixed $numCases)
Set the plural rule names with examples (using CLDR format).
setPluralRule(mixed $pluralRule)
Set the plural rules definition of this locale (using gettext format).
string
getLanguageText(string|null $locale = null)
Get the display name of this locale.