Java java.util Locale fields, constructors, methods, implement or subclass

Example usage for Java java.util Locale fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util Locale.

The text is from its open source code.

Implementation

java.util.Locale has the following implementations.
Click this link to see all its implementation.

Field

LocaleENGLISH
Useful constant for language.
LocaleFRENCH
Useful constant for language.
LocaleGERMAN
Useful constant for language.
LocaleITALIAN
Useful constant for language.
LocaleJAPANESE
Useful constant for language.
LocaleKOREAN
Useful constant for language.
LocaleCHINESE
Useful constant for language.
LocaleSIMPLIFIED_CHINESE
Useful constant for language.
LocaleTRADITIONAL_CHINESE
Useful constant for language.
LocaleFRANCE
Useful constant for country.
LocaleGERMANY
Useful constant for country.
LocaleITALY
Useful constant for country.
LocaleJAPAN
Useful constant for country.
LocaleKOREA
Useful constant for country.
LocaleUK
Useful constant for country.
LocaleUS
Useful constant for country.
LocaleCANADA
Useful constant for country.
LocaleCANADA_FRENCH
Useful constant for country.
LocaleROOT
Useful constant for the root locale.
LocaleCHINA
Useful constant for country.
LocalePRC
Useful constant for country.
LocaleTAIWAN
Useful constant for country.

Constructor

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.

Method

Objectclone()
Overrides Cloneable.
booleanequals(Object obj)
Returns true if this Locale is equal to another object.
Listfilter(List priorityList, Collection locales)
Returns a list of matching Locale instances using the filtering mechanism defined in RFC 4647.
LocaleforLanguageTag(String languageTag)
Returns a locale for the specified IETF BCP 47 language tag string.
Locale[]getAvailableLocales()
Returns an array of all installed locales.
ClassgetClass()
Returns the runtime class of this Object .
StringgetCountry()
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.
LocalegetDefault()
Gets the current value of the default locale for this instance of the Java Virtual Machine.
LocalegetDefault(Locale.Category category)
Gets the current value of the default locale for the specified Category for this instance of the Java Virtual Machine.
StringgetDisplayCountry()
Returns a name for the locale's country that is appropriate for display to the user.
StringgetDisplayCountry(Locale inLocale)
Returns a name for the locale's country that is appropriate for display to the user.
StringgetDisplayLanguage()
Returns a name for the locale's language that is appropriate for display to the user.
StringgetDisplayLanguage(Locale inLocale)
Returns a name for the locale's language that is appropriate for display to the user.
StringgetDisplayName()
Returns a name for the locale that is appropriate for display to the user.
StringgetDisplayName(Locale inLocale)
Returns a name for the locale that is appropriate for display to the user.
StringgetDisplayScript()
Returns a name for the locale's script that is appropriate for display to the user.
StringgetDisplayVariant()
Returns a name for the locale's variant code that is appropriate for display to the user.
StringgetDisplayVariant(Locale inLocale)
Returns a name for the locale's variant code that is appropriate for display to the user.
SetgetExtensionKeys()
Returns the set of extension keys associated with this locale, or the empty set if it has no extensions.
StringgetISO3Country()
Returns a three-letter abbreviation for this locale's country.
StringgetISO3Language()
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.
StringgetLanguage()
Returns the language code of this Locale.
StringgetScript()
Returns the script for this locale, which should either be the empty string or an ISO 15924 4-letter script code.
SetgetUnicodeLocaleAttributes()
Returns the set of unicode locale attributes associated with this locale, or the empty set if it has no attributes.
SetgetUnicodeLocaleKeys()
Returns the set of Unicode locale keys defined by this locale, or the empty set if this locale has none.
StringgetVariant()
Returns the variant code for this locale.
booleanhasExtensions()
Returns true if this Locale has any extensions.
inthashCode()
Override hashCode.
Localelookup(List priorityList, Collection locales)
Returns a Locale instance for the best-matching language tag using the lookup mechanism defined in RFC 4647.
voidsetDefault(Locale.Category category, Locale newLocale)
Sets the default locale for the specified Category for this instance of the Java Virtual Machine.
voidsetDefault(Locale newLocale)
Sets the default locale for this instance of the Java Virtual Machine.
StringtoLanguageTag()
Returns a well-formed IETF BCP 47 language tag representing this locale.
StringtoString()
Returns a string representation of this Locale object, consisting of language, country, variant, script, and extensions as below:
language + "_" + country + "_" + (variant + "_#" | "#") + script + "_" + extensions
Language is always lower case, country is always upper case, script is always title case, and extensions are always lower case.