public class LanguageUtil
extends java.lang.Object
LanguageUtil
...Modifier and Type | Field and Description |
---|---|
static java.util.Set<java.lang.String> |
ISO_COUNTRIES
Set of all valid country iso codes.
|
static java.util.Set<java.lang.String> |
ISO_LANGUAGES
Set of all valid language iso codes.
|
static java.lang.String |
PSEUDO_LANGUAGE |
Constructor and Description |
---|
LanguageUtil() |
Modifier and Type | Method and Description |
---|---|
static Language |
getLanguage(java.lang.String code)
Returns the language for the given language/country abbreviation.
|
static java.lang.String |
getLanguageRoot(java.lang.String path)
Returns the language root for the given path by only analyzing the path
names starting at the root.
|
static java.util.Locale |
getLocale(java.lang.String code)
Returns the language locale for the given language/country abbreviation.
|
public static final java.util.Set<java.lang.String> ISO_LANGUAGES
Locale.getISOLanguages()
public static final java.util.Set<java.lang.String> ISO_COUNTRIES
Locale.getISOCountries()
public static final java.lang.String PSEUDO_LANGUAGE
public static java.util.Locale getLocale(java.lang.String code)
code
- the language/country code. eg de_CHpublic static Language getLanguage(java.lang.String code)
code
- the language/country code. eg de_CH or de-CHpublic static java.lang.String getLanguageRoot(java.lang.String path)
path
- pathnull
if not foundCopyright © 2010 - 2020 Adobe. All Rights Reserved