public class LocaleUtil
extends Object
Modifier and Type | Field and Description |
---|---|
static Locale |
BRAZIL |
static Locale |
CANADA |
static Locale |
CANADA_FRENCH |
static Locale |
CHINA |
static Locale |
CHINESE |
static Locale |
ENGLISH |
static Locale |
FRANCE |
static Locale |
FRENCH |
static Locale |
GERMAN |
static Locale |
GERMANY |
static Locale |
HUNGARY |
static Locale |
ITALIAN |
static Locale |
ITALY |
static Locale |
JAPAN |
static Locale |
JAPANESE |
static Locale |
KOREA |
static Locale |
KOREAN |
static Locale |
NETHERLANDS |
static Locale |
PORTUGAL |
static Locale |
PRC |
static Locale |
ROOT |
static Locale |
SIMPLIFIED_CHINESE |
static Locale |
SPAIN |
static Locale |
TAIWAN |
static Locale |
TRADITIONAL_CHINESE |
static Locale |
UK |
static Locale |
US |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(Locale locale1,
Locale locale2) |
static Locale |
fromLanguageId(String languageId) |
static Locale |
fromLanguageId(String languageId,
boolean validate) |
static Locale |
fromLanguageId(String languageId,
boolean validate,
boolean useDefault) |
static Locale[] |
fromLanguageIds(List<String> languageIds) |
static Locale[] |
fromLanguageIds(String[] languageIds) |
static Locale |
getDefault() |
static LocaleUtil |
getInstance() |
static Map<String,String> |
getISOLanguages(Locale locale) |
static String |
getLongDisplayName(Locale locale,
Set<String> duplicateLanguages) |
static Locale |
getMostRelevantLocale() |
static String |
getShortDisplayName(Locale locale,
Set<String> duplicateLanguages) |
static Locale |
getSiteDefault() |
static void |
setDefault(String userLanguage,
String userCountry,
String userVariant) |
static String |
toBCP47LanguageId(Locale locale) |
static String |
toBCP47LanguageId(String languageId) |
static String[] |
toBCP47LanguageIds(Locale[] locales) |
static String[] |
toBCP47LanguageIds(String[] languageIds) |
static String[] |
toDisplayNames(Collection<Locale> locales,
Locale locale) |
static String |
toLanguageId(Locale locale) |
static String[] |
toLanguageIds(Collection<Locale> locales) |
static String[] |
toLanguageIds(Locale[] locales) |
static String |
toW3cLanguageId(Locale locale) |
static String |
toW3cLanguageId(String languageId) |
static String[] |
toW3cLanguageIds(Locale[] locales) |
static String[] |
toW3cLanguageIds(String[] languageIds) |
public static final Locale BRAZIL
public static final Locale CANADA
public static final Locale CANADA_FRENCH
public static final Locale CHINA
public static final Locale CHINESE
public static final Locale ENGLISH
public static final Locale FRANCE
public static final Locale FRENCH
public static final Locale GERMAN
public static final Locale GERMANY
public static final Locale HUNGARY
public static final Locale ITALIAN
public static final Locale ITALY
public static final Locale JAPAN
public static final Locale JAPANESE
public static final Locale KOREA
public static final Locale KOREAN
public static final Locale NETHERLANDS
public static final Locale PORTUGAL
public static final Locale PRC
public static final Locale ROOT
public static final Locale SIMPLIFIED_CHINESE
public static final Locale SPAIN
public static final Locale TAIWAN
public static final Locale TRADITIONAL_CHINESE
public static final Locale UK
public static final Locale US
public static boolean equals(Locale locale1, Locale locale2)
public static Locale fromLanguageId(String languageId)
public static Locale fromLanguageId(String languageId, boolean validate)
public static Locale fromLanguageId(String languageId, boolean validate, boolean useDefault)
public static Locale[] fromLanguageIds(List<String> languageIds)
public static Locale[] fromLanguageIds(String[] languageIds)
public static Locale getDefault()
public static LocaleUtil getInstance()
public static Map<String,String> getISOLanguages(Locale locale)
public static String getLongDisplayName(Locale locale, Set<String> duplicateLanguages)
public static Locale getMostRelevantLocale()
public static String getShortDisplayName(Locale locale, Set<String> duplicateLanguages)
public static Locale getSiteDefault()
public static void setDefault(String userLanguage, String userCountry, String userVariant)
public static String toBCP47LanguageId(Locale locale)
public static String toBCP47LanguageId(String languageId)
public static String[] toBCP47LanguageIds(Locale[] locales)
public static String[] toBCP47LanguageIds(String[] languageIds)
public static String[] toDisplayNames(Collection<Locale> locales, Locale locale)
public static String toLanguageId(Locale locale)
public static String[] toLanguageIds(Collection<Locale> locales)
public static String[] toLanguageIds(Locale[] locales)
public static String toW3cLanguageId(Locale locale)
public static String toW3cLanguageId(String languageId)
public static String[] toW3cLanguageIds(Locale[] locales)
public static String[] toW3cLanguageIds(String[] languageIds)