Script unit that provides functions for managing locales.
Methods |
---|
function of(language: string, country: string): locale Creates a locale. |
function fromString(value: string): locale Creates a locale from a string. |
Creates a locale.
Parameters :
language: An ISO 639 alpha-2 or alpha-3 language code.
country: An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code.
Return :
the locale.
Creates a locale from a string.
Parameters :
value: A locale, for example 'en-US'.
Return :
the locale.