public class LocaleUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.Map<java.lang.String,jodd.util.LocaleUtil.LocaleData> |
locales |
Constructor and Description |
---|
LocaleUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
decodeLocaleCode(java.lang.String localeCode)
Decodes locale code in string array that can be used for
Locale constructor. |
static DateFormatSymbolsEx |
getDateFormatSymbols(java.util.Locale locale)
Returns cached
DateFormatSymbols instance for specified locale. |
static java.util.Locale |
getLocale(java.lang.String languageCode)
Returns Locale from cache where Locale may be specified also using language code.
|
static java.util.Locale |
getLocale(java.lang.String language,
java.lang.String country)
Returns Locale from cache.
|
static java.util.Locale |
getLocale(java.lang.String language,
java.lang.String country,
java.lang.String variant)
Returns Locale from cache.
|
static java.text.NumberFormat |
getNumberFormat(java.util.Locale locale)
Returns cached
NumberFormat instance for specified locale. |
protected static jodd.util.LocaleUtil.LocaleData |
lookupLocaleData(java.util.Locale locale) |
protected static jodd.util.LocaleUtil.LocaleData |
lookupLocaleData(java.lang.String code)
Lookups for locale data and creates new if it doesn't exist.
|
static java.lang.String |
resolveLocaleCode(java.util.Locale locale)
Resolves locale code from locale.
|
static java.lang.String |
resolveLocaleCode(java.lang.String lang,
java.lang.String country,
java.lang.String variant)
Transforms locale data to locale code.
|
protected static java.util.Map<java.lang.String,jodd.util.LocaleUtil.LocaleData> locales
protected static jodd.util.LocaleUtil.LocaleData lookupLocaleData(java.lang.String code)
protected static jodd.util.LocaleUtil.LocaleData lookupLocaleData(java.util.Locale locale)
public static java.util.Locale getLocale(java.lang.String language, java.lang.String country, java.lang.String variant)
public static java.util.Locale getLocale(java.lang.String language, java.lang.String country)
public static java.util.Locale getLocale(java.lang.String languageCode)
public static java.lang.String resolveLocaleCode(java.lang.String lang, java.lang.String country, java.lang.String variant)
null
values are allowed.public static java.lang.String resolveLocaleCode(java.util.Locale locale)
public static java.lang.String[] decodeLocaleCode(java.lang.String localeCode)
Locale
constructor.public static DateFormatSymbolsEx getDateFormatSymbols(java.util.Locale locale)
DateFormatSymbols
instance for specified locale.public static java.text.NumberFormat getNumberFormat(java.util.Locale locale)
NumberFormat
instance for specified locale.Copyright © 2003-2013 Jodd Team