new module:models/Locale()
Constructs a new Locale
.
Document that describes a single locale.
- Source:
Members
(inner) country :String
The country/region code for this Locale, which will either be the empty string or an upercase ISO 3166 2-letter code.
Type:
- String
- Source:
(inner) default :Boolean
Flag that is true if the locale is the default one to use if an explicit locale is not specified.
Type:
- Boolean
- Source:
(inner) display_country :String
The name for the Locale's country that is appropriate for display to the user, or an empty string if no country has been specified for the Locale. The display country is returned in the language defined for this locale, and not in the language of the session locale.
Type:
- String
- Source:
(inner) display_language :String
The name for the Locale's language that is appropriate for display to the user, or an empty string if no language has been specified for the Locale. The display language is returned in the language defined for this locale, and not in the language of the session locale.
Type:
- String
- Source:
(inner) display_name :String
The name for the Locale that is appropriate for display to the user, or an empty string if no display name has been specified for the Locale. The display name is returned in the language defined for this locale, and not in the language of the session locale.
Type:
- String
- Source:
(inner) id :String
The identifier of the Locale. Contains a combination of the language and the country key, concatenated by "-", e.g. "en-US". This attribute is the primary key of the class.
Type:
- String
- Source:
(inner) iso3_country :String
The three-letter abbreviation for this Locale's country, or an empty string if no country has been specified for the Locale.
Type:
- String
- Source:
(inner) iso3_language :String
The three-letter abbreviation for this Locale's language, or an empty string if no language has been specified for the Locale.
Type:
- String
- Source:
(inner) language :String
The language code for this Locale, which will either be the empty string or a lowercase ISO 639 code.
Type:
- String
- Source:
(inner) name :String
The display name of the Locale. This uses the current request locale to localize the value.
Type:
- String
- Source:
Methods
(static) constructFromObject(data, obj) → {module:models/Locale}
Constructs a Locale
from a plain JavaScript object, optionally creating a new instance.
Copies all relevant properties from data
to obj
if supplied or a new instance if not.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The plain JavaScript object bearing properties of interest. |
obj |
module:models/Locale | Optional instance to populate. |
- Source:
Returns:
The populated Locale
instance.
- Type
- module:models/Locale