OverviewSingleDeprecated

jsx3.util

class Locale

Object
->jsx3.lang.Object
  ->jsx3.util.Locale

class Locale
extends jsx3.lang.Object
Represents a region of the world. Other classes may be localized, meaning that their behavior depends on their assigned locale.

Since:

3.2

Field Summary
static jsx3.util.Locale
ENGLISH
Locale for English (country unspecified).
static jsx3.util.Locale
UK
Locale for United Kingdom.
static jsx3.util.Locale
US
Locale for United States of America.
Constructor Summary
void
init(strLanguage : String, strCountry : String)
The instance initializer.
Method Summary
boolean
equals(obj : Object)
Returns true if obj is equal to this locale.
String
Returns the uppercase two letter ISO-3166 country code.
String
Returns the country of this locale, localized for objLocale.
String
Returns the language of this locale, localized for objLocale.
String
Returns the language and country of this locale, localized for objLocale.
String
Returns the lowercase two letter ISO-639 language code.
String
static jsx3.util.Locale
valueOf(strKey : String)
Returns a locale instance represented by strKey.
Methods Inherited From jsx3.lang.Object
clone, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Field Detail

ENGLISH

static jsx3.util.Locale ENGLISH
Locale for English (country unspecified).

UK

static jsx3.util.Locale UK
Locale for United Kingdom.

US

static jsx3.util.Locale US
Locale for United States of America.
Constructor Detail

init

void init(strLanguage : String, strCountry : String)
The instance initializer.

Parameters:

strLanguagethe lowercase two letter ISO-639 language code.
strCountrythe uppercase two letter ISO-3166 country code.
Method Detail

equals

boolean equals(obj : Object)
Returns true if obj is equal to this locale.

Parameters:

obj

Returns:

 

Overrides:

equals in jsx3.lang.Object

getCountry

String getCountry()
Returns the uppercase two letter ISO-3166 country code.

Returns:

 

getDisplayCountry

String getDisplayCountry(objLocale : jsx3.util.Locale)
Returns the country of this locale, localized for objLocale.

Parameters:

objLocalethe locale in which to format the country. If this parameter is not provided, the system locale is used.

Returns:

 

getDisplayLanguage

String getDisplayLanguage(objLocale : jsx3.util.Locale)
Returns the language of this locale, localized for objLocale.

Parameters:

objLocalethe locale in which to format the language. If this parameter is not provided, the system locale is used.

Returns:

 

getDisplayName

String getDisplayName(objLocale : jsx3.util.Locale)
Returns the language and country of this locale, localized for objLocale.

Parameters:

objLocalethe locale in which to format the language and country. If this parameter is not provided, the system locale is used.

Returns:

 

getLanguage

String getLanguage()
Returns the lowercase two letter ISO-639 language code.

Returns:

 

toString

String toString()

Returns:

 

Overrides:

toString in jsx3.lang.Object

valueOf

static jsx3.util.Locale valueOf(strKey : String)
Returns a locale instance represented by strKey.

Parameters:

strKeythe locale key, ll_CC, where ll is the two letter language code and CC is the two letter country code.

Returns: