|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.i18n.Locale
Represents a specific geographical, political, or cultural region to be used for localizing numbers, dates, and text.
Compatible with java.util.Locale in Java's standard edition.
| Field Summary | ||
static int |
APPLICATION
In a global event, check this flag to see if the change was an application or a global one. |
|
static long |
GUID_LOCALE_CHANGED
GUID for global event sent when the current locale changes. |
|
static int |
LOCALE_de
|
|
static int |
LOCALE_en
|
|
static int |
LOCALE_en_GB
|
|
static int |
LOCALE_en_US
|
|
static int |
LOCALE_es
|
|
static int |
LOCALE_fr
|
|
static int |
LOCALE_it
|
|
static int |
LOCALE_ROOT
|
|
| Method Summary | ||
boolean |
equals(Object obj)
Determines if provided object is equal to this locale. |
|
static Locale |
get(int code)
Retrieves locale by code. |
|
static Locale |
get(int code,
String variant)
Retrieves locale by code suggesting variant name. |
|
static Locale |
get(String language)
Retrieves locale by language. |
|
static Locale |
get(String language,
String country)
Retrieves locale by language and country. |
|
static Locale |
get(String language,
String country,
String variant)
Retrieves locale by language, country, and variant. |
|
static Locale[] |
getAvailableLocales()
Retrieves list of known locales. |
|
int |
getCode()
Retrieves integer code for this locale. |
|
String |
getCountry()
Retrieves this locale's ISO country code. |
|
static Locale |
getDefault()
Retrieves the current application's default locale. |
|
static Locale |
getDefaultForKeyboard()
Retrieves default locale for the keyboard. |
|
static Locale |
getDefaultForSystem()
Retrieves system's current default locale. |
|
String |
getDisplayCountry()
Retrieves displayable name for this locale's country. |
|
String |
getDisplayLanguage()
Retrieves displayable name for this locale's language. |
|
String |
getDisplayVariant()
Retrieves displayable name for this locale's variant. |
|
static String[] |
getISOCountries()
Retrieves a list of all 2-letter country codes defined in ISO 3166. |
|
static String[] |
getISOLanguages()
Retrieves a list of all 2-letter language codes defined in ISO 639. |
|
String |
getLanguage()
Retrieves this locale's ISO language code. |
|
String |
getVariant()
Retrieves this locale's variant name. |
|
int |
hashCode()
Retrieves hash code for this locale. |
|
static void |
setDefault(Locale defaultLocale)
Sets default locale for the current application. |
|
String |
toString()
Retrieves the programmatic name of the entire locale. |
|
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final long GUID_LOCALE_CHANGED
public static final int APPLICATION
| Method Detail |
public static Locale get(int code)
Note: This method simply invokes
get(code,null); this it ignores variants. If no
locale exists for the code you specify, then this method creates the new
locale, with an empty variant name.
code - Locale code.public static Locale get(int code, String variant)
Note: if no local exists for the code you specify, then this method creates the new locale. If, in such a case, you passed a null string in for the variant, this method gives an empty variant name to the new locale.
code - Locale code.variant - Name of locale variant; may be null to indicate no
variant. This parameter is only relevant if this method ends up creating
a new locale; otherwise, it is ignored.public static Locale get(String language)
This method simply invokes
get(language,country=null,variant=null.
If no such locale exists, this method creates an entry for it with an empty
variant name.
language - Language for locale.public static Locale get(String language, String country)
This method simply invokes
get(language,country,variant=null.
If no such locale exists, this method creates an entry for it with an empty
variant name.
language - Langauge for locale.country - Country for locale; may be null to indicate no country
specified.public static Locale get(String language, String country, String variant)
If no such locale exists, this method creates an entry for it; if, in this case, you provide null for the variant name, this method gives an empty variant name to the new locale.
language - Langauge for locale.country - Country for locale; may be null to indicate no country
specified.variant - Name of locale variant; may be null to indicate no
variant (but see description).public static Locale[] getAvailableLocales()
public int getCode()
public final String getCountry()
public static Locale getDefault()
public static Locale getDefaultForSystem()
public static Locale getDefaultForKeyboard()
public final String getDisplayCountry()
public final String getDisplayLanguage()
public final String getDisplayVariant()
public static String[] getISOCountries()
public static String[] getISOLanguages()
public final String getLanguage()
public final String getVariant()
public static void setDefault(Locale defaultLocale)
defaultLocale - New default locale for the current application; this
value always overrides the system value. If null, the current application
will inherit the system locale, and the application's locale will change
whenever the system locale changes.public String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.