public class LocaleHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.Locale |
getLocale(java.lang.String localeAbbr)
gets Locale from a String representing a Locale
|
static boolean |
isCountry(java.lang.String isoLang)
Determines if a two letter combination is a valid ISO country code.
|
static boolean |
isLanguage(java.lang.String isoLang)
Determines if a two letter combination is a valid ISO language code.
|
public static final java.util.Locale getLocale(java.lang.String localeAbbr)
the String has the form of language_country as used by ResourceBundles and should comply to the two letter ISO definitions of language and country.
If the String default is supplied an empty Locale is returned.
localeAbbr - String, the String representing a locale. This function is case
insensitive.public static final boolean isLanguage(java.lang.String isoLang)
isoLang - String, the two letter String combination.public static final boolean isCountry(java.lang.String isoLang)
isoLang - String, the two letter String combination.