class Language implementsJsonSerializable
Properties
staticprotectedarray | $languagesNames | ||
staticprotectedarray | $regionsNames | ||
protectedstring | $id | ||
protectedstring | $code | ||
protectedstring|null | $variant | ||
protectedstring|null | $region | ||
protectedarray | $names | ||
protectedstring | $isoName | ||
protectedstring | $nativeName |
Methods
No description
Get the list of the known languages.
Get the list of the known regions.
Get both isoName and nativeName as an array.
Returns the original locale ID.
Returns the code of the locale "en"/"fr".
Returns the variant code such as cyrl/latn.
Returns the variant such as Cyrillic/Latin.
Returns the region part of the locale.
Returns the region name for the current language.
Returns the long ISO language name.
Set the ISO language name.
Return the full name of the language in this language.
Set the name of the language in this language.
Returns the short ISO language name.
Get the short name of the language in this language.
Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable.
Get a string with short native name, region in parentheses if applicable, variant in parentheses if applicable.
Get a string with long ISO name, region in parentheses if applicable, variant in parentheses if applicable.
Get a string with long native name, region in parentheses if applicable, variant in parentheses if applicable.
Returns the original locale ID.
No description
Details
at line64
__construct(string$id)
at line86
staticarray
all()
Get the list of the known languages.
at line100
staticarray
regions()
Get the list of the known regions.
at line114
array
getNames()
Get both isoName and nativeName as an array.
at line131
string
getId()
Returns the original locale ID.
at line141
string
getCode()
Returns the code of the locale "en"/"fr".
at line151
string|null
getVariant()
Returns the variant code such as cyrl/latn.
at line161
string|null
getVariantName()
Returns the variant such as Cyrillic/Latin.
at line179
string|null
getRegion()
Returns the region part of the locale.
at line189
string|null
getRegionName()
Returns the region name for the current language.
at line199
string
getFullIsoName()
Returns the long ISO language name.
at line213
setIsoName(string$isoName)
Set the ISO language name.
at line225
string
getFullNativeName()
Return the full name of the language in this language.
at line239
setNativeName(string$nativeName)
Set the name of the language in this language.
at line251
string
getIsoName()
Returns the short ISO language name.
at line263
string
getNativeName()
Get the short name of the language in this language.
at line275
string
getIsoDescription()
Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable.
at line288
string
getNativeDescription()
Get a string with short native name, region in parentheses if applicable, variant in parentheses if applicable.
at line301
string
getFullIsoDescription()
Get a string with long ISO name, region in parentheses if applicable, variant in parentheses if applicable.
at line314
string
getFullNativeDescription()
Get a string with long native name, region in parentheses if applicable, variant in parentheses if applicable.
at line327
string
__toString()
Returns the original locale ID.