Java org.apache.commons.lang3 LocaleUtils fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.lang3 LocaleUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.lang3 LocaleUtils.

The text is from its open source code.

Subclass

org.apache.commons.lang3.LocaleUtils has subclasses.
Click this link to see all its subclasses.

Method

ListavailableLocaleList()

Obtains an unmodifiable list of installed locales.

This method is a wrapper around Locale#getAvailableLocales() .

SetavailableLocaleSet()

Obtains an unmodifiable set of installed locales.

This method is a wrapper around Locale#getAvailableLocales() .

ListcountriesByLanguage(final String languageCode)

Obtains the list of countries supported for a given language.

This method takes a language code and searches to find the countries available for that language.

booleanisAvailableLocale(final Locale locale)

Checks if the locale specified is in the list of available locales.

ListlanguagesByCountry(final String countryCode)

Obtains the list of languages supported for a given country.

This method takes a country code and searches to find the languages available for that country.

ListlocaleLookupList(final Locale locale)

Obtains the list of locales to search through when performing a locale search.

 localeLookupList(Locale("fr","CA","xxx")) = [Locale("fr","CA","xxx"), Locale("fr","CA"), Locale("fr")] 
ListlocaleLookupList(final Locale locale, final Locale defaultLocale)

Obtains the list of locales to search through when performing a locale search.

 localeLookupList(Locale("fr", "CA", "xxx"), Locale("en")) = [Locale("fr","CA","xxx"), Locale("fr","CA"), Locale("fr"), Locale("en"] 

The result list begins with the most specific locale, then the next more general and so on, finishing with the default locale.

LocaletoLocale(final String str)

Converts a String to a Locale.

This method takes the string format of a locale and creates the locale object from it.

 LocaleUtils.toLocale("")           = new Locale("", "") LocaleUtils.toLocale("en")         = new Locale("en", "") LocaleUtils.toLocale("en_GB")      = new Locale("en", "GB") LocaleUtils.toLocale("en_GB_xxx")  = new Locale("en", "GB", "xxx")   (#) 

(#) The behaviour of the JDK variant constructor changed between JDK1.3 and JDK1.4.