public class I18N extends Object
| Constructor and Description |
|---|
I18N() |
| Modifier and Type | Method and Description |
|---|---|
static Locale |
getParent(Locale locale)
Returns the parent locale of a locale or null when it does not have one.
|
static Locale |
parseJavaIdentifier(String s)
Parse the java string representation and returns a locale.
|
static Locale |
parseTagIdentifier(String s)
Parse the http://www.ietf.org/rfc/rfc1766.txt string representation and returns a locale.
|
static String |
toJavaIdentifier(Locale locale)
Provide a string representation of the locale argument to the
Locale.toString() method. |
static String |
toTagIdentifier(Locale locale)
Provide a string representation of the locale argument according to the http://www.ietf.org/rfc/rfc1766.txt :
locale with a language only will return the language string
otherwise it returns the language and country separated by an hyphen '-'
|
public static String toJavaIdentifier(Locale locale) throws NullPointerException
Locale.toString() method.locale - the localeNullPointerException - if the locale argument is nullpublic static Locale parseJavaIdentifier(String s) throws NullPointerException, IllegalArgumentException
toJavaIdentifier(java.util.Locale) method for
more details.s - the java representation to parseNullPointerException - if the locale argument is nullIllegalArgumentException - if the string cannot be parsed to a localepublic static String toTagIdentifier(Locale locale) throws NullPointerException
locale - the localeNullPointerException - if the locale argument is nullpublic static Locale parseTagIdentifier(String s) throws NullPointerException, IllegalArgumentException
toTagIdentifier(java.util.Locale) method for more details.s - the RFC1766 representation to parseNullPointerException - if the locale argument is nullIllegalArgumentException - if the string cannot be parsed to a localepublic static Locale getParent(Locale locale) throws NullPointerException
locale - the localeNullPointerException - if the specified locale is nullCopyright © 2017 JBoss by Red Hat. All Rights Reserved.