Example usage for Java java.util Locale fields, constructors, methods, implement or subclass
The text is from its open source code.
Locale | ENGLISH Useful constant for language. |
Locale | FRENCH Useful constant for language. |
Locale | GERMAN Useful constant for language. |
Locale | ITALIAN Useful constant for language. |
Locale | JAPANESE Useful constant for language. |
Locale | KOREAN Useful constant for language. |
Locale | CHINESE Useful constant for language. |
Locale | SIMPLIFIED_CHINESE Useful constant for language. |
Locale | TRADITIONAL_CHINESE Useful constant for language. |
Locale | FRANCE Useful constant for country. |
Locale | GERMANY Useful constant for country. |
Locale | ITALY Useful constant for country. |
Locale | JAPAN Useful constant for country. |
Locale | KOREA Useful constant for country. |
Locale | UK Useful constant for country. |
Locale | US Useful constant for country. |
Locale | CANADA Useful constant for country. |
Locale | CANADA_FRENCH Useful constant for country. |
Locale | ROOT Useful constant for the root locale. |
Locale | CHINA Useful constant for country. |
Locale | PRC Useful constant for country. |
Locale | TAIWAN Useful constant for country. |
Locale(BaseLocale baseLocale, LocaleExtensions extensions) Private constructor used by getInstance method | |
Locale(String language, String country) Construct a locale from language and country. | |
Locale(String language) Construct a locale from a language code. | |
Locale(String language, String country, String variant) Construct a locale from language, country and variant. |
Object | clone() Overrides Cloneable. |
boolean | equals(Object obj) Returns true if this Locale is equal to another object. |
List | filter(List Returns a list of matching Locale instances using the filtering mechanism defined in RFC 4647. |
Locale | forLanguageTag(String languageTag) Returns a locale for the specified IETF BCP 47 language tag string. |
Locale[] | getAvailableLocales() Returns an array of all installed locales. |
Class> | getClass() Returns the runtime class of this Object . |
String | getCountry() Returns the country/region code for this locale, which should either be the empty string, an uppercase ISO 3166 2-letter code, or a UN M.49 3-digit code. |
Locale | getDefault() Gets the current value of the default locale for this instance of the Java Virtual Machine. |
Locale | getDefault(Locale.Category category) Gets the current value of the default locale for the specified Category for this instance of the Java Virtual Machine. |
String | getDisplayCountry() Returns a name for the locale's country that is appropriate for display to the user. |
String | getDisplayCountry(Locale inLocale) Returns a name for the locale's country that is appropriate for display to the user. |
String | getDisplayLanguage() Returns a name for the locale's language that is appropriate for display to the user. |
String | getDisplayLanguage(Locale inLocale) Returns a name for the locale's language that is appropriate for display to the user. |
String | getDisplayName() Returns a name for the locale that is appropriate for display to the user. |
String | getDisplayName(Locale inLocale) Returns a name for the locale that is appropriate for display to the user. |
String | getDisplayScript() Returns a name for the locale's script that is appropriate for display to the user. |
String | getDisplayVariant() Returns a name for the locale's variant code that is appropriate for display to the user. |
String | getDisplayVariant(Locale inLocale) Returns a name for the locale's variant code that is appropriate for display to the user. |
Set | getExtensionKeys() Returns the set of extension keys associated with this locale, or the empty set if it has no extensions. |
String | getISO3Country() Returns a three-letter abbreviation for this locale's country. |
String | getISO3Language() Returns a three-letter abbreviation of this locale's language. |
String[] | getISOCountries() Returns a list of all 2-letter country codes defined in ISO 3166. |
String[] | getISOLanguages() Returns a list of all 2-letter language codes defined in ISO 639. |
String | getLanguage() Returns the language code of this Locale. |
String | getScript() Returns the script for this locale, which should either be the empty string or an ISO 15924 4-letter script code. |
Set | getUnicodeLocaleAttributes() Returns the set of unicode locale attributes associated with this locale, or the empty set if it has no attributes. |
Set | getUnicodeLocaleKeys() Returns the set of Unicode locale keys defined by this locale, or the empty set if this locale has none. |
String | getVariant() Returns the variant code for this locale. |
boolean | hasExtensions() Returns true if this Locale has any extensions. |
int | hashCode() Override hashCode. |
Locale | lookup(List Returns a Locale instance for the best-matching language tag using the lookup mechanism defined in RFC 4647. |
void | setDefault(Locale.Category category, Locale newLocale) Sets the default locale for the specified Category for this instance of the Java Virtual Machine. |
void | setDefault(Locale newLocale) Sets the default locale for this instance of the Java Virtual Machine. |
String | toLanguageTag() Returns a well-formed IETF BCP 47 language tag representing this locale. |
String | toString() Returns a string representation of this Locale object, consisting of language, country, variant, script, and extensions as below: language + "_" + country + "_" + (variant + "_#" | "#") + script + "_" + extensionsLanguage is always lower case, country is always upper case, script is always title case, and extensions are always lower case. |