Class deCarta.Mobile.Locale
A Locale object represents a specific geographical, political, or cultural region. An operation that requires a Locale to perform its task is called locale-sensitive and uses the Locale to tailor information for the user. Currently, Locales can be attached to a deCarta.Mobile.FreeFormAddress object to aid in producing better results with a deCarta.Mobile.Geocoder:geocode().
These pairs of language can be used to create a valid locale for use with the Geocoder.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
deCarta.Mobile.Locale(language, country)
A language, country pair for localization
|
| Method Attributes | Method Name and Description |
|---|---|
|
Retrieve the ISO Country Code for this locale
|
|
|
Retrieve the ISO Language Code for this locale
|
|
|
setCountry(country)
Set the ISO Country Code for this locale.
|
|
|
setLanguage(language)
Set the ISO Language Code for this locale.
|
|
|
toString()
Concatenates the country and language fields, in that order and returns
that string.
|
Class Detail
deCarta.Mobile.Locale(language, country)
A language, country pair for localization
- Parameters:
- {String} language
- required A valid ISO Language Code. It is always an upper case, two letter string. See the class description for valid language and country code pairs.
- {String} country
- required A valid ISO Country Code. It is always an upper case, two letter string. See the class description for valid language and country code pairs.
Method Detail
{String}
getCountry()
Retrieve the ISO Country Code for this locale
- Returns:
- {String} country field of the Locale object
{String}
getLanguage()
Retrieve the ISO Language Code for this locale
- Returns:
- {String} language field of the Locale object
setCountry(country)
Set the ISO Country Code for this locale.
- Parameters:
- {String} country
- required country required A valid ISO Country Code. It is always an upper case, two letter string. See the class description for valid language and country code pairs.
setLanguage(language)
Set the ISO Language Code for this locale.
- Parameters:
- {String} language
- required A valid ISO Language Code. It is always an upper case, two letter string. See the class description for valid language and country code pairs.
{String}
toString()
Concatenates the country and language fields, in that order and returns
that string.
- Returns:
- {String} The Locale object as a single, underbar delimited string, ex: "en_US".