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

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

Introduction

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

The text is from its open source code.

Method

booleanisAvailableLocale(Locale locale)

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

ListlocaleLookupList(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(Locale locale, 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(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("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.