public class Language extends Object
| Constructor and Description |
|---|
Language(Locale locale)
Constructs new instance of Language.
|
| Modifier and Type | Method and Description |
|---|---|
Locale |
getLocale() |
static Locale |
getLocale(String language)
Create
Locale from Language Tag string. |
String |
getPrimaryTag()
Get primary-tag of language tag, e. g. if Language tag 'en-gb' then 'en' is primary-tag.
|
String |
getSubTag()
Get sub-tag of language tag, e. g. if Language tag 'en-gb' then 'gb' is sub-tag.
|
boolean |
isCompatible(Language other)
Check is two Language instance is compatible.
|
String |
toString() |
public Language(Locale locale)
locale - LocaleLocale}public static Locale getLocale(String language)
Locale from Language Tag string.language - string representation of Language Tag, See HTTP/1.1 documentation.Localepublic String getPrimaryTag()
public String getSubTag()
public boolean isCompatible(Language other)
other - checked languageCopyright © 2015. All rights reserved.