public class LanguageTag extends Object implements LanguageTagCodes
LT_DEFAULT, LT_EXTRA, LT_IANA, LT_IANA_DEPRECATED, LT_ILLEGAL, LT_ISO3166, LT_ISO639, LT_LOCAL_USE, LT_MULTIPLE, LT_PRIVATE_USE, LT_UNDETERMINED
Constructor and Description |
---|
LanguageTag(String tag)
Creates new RFC3066 LanguageTag.
|
Modifier and Type | Method and Description |
---|---|
String |
errorMessage()
An error message describing the reason the tag
is illegal.
|
int |
tagType()
The properties of this LanguageTag, expressed as a bitwise or of
fields from
LanguageTagCodes . |
public LanguageTag(String tag) throws LanguageTagSyntaxException
tag
- The tag to parse and analyse.LanguageTagSyntaxException
- If the syntactic rules of RFC3066 section 2.1 are
broken.public int tagType()
LanguageTagCodes
.
If the tag is illegal only LT_ILLEGAL
is reported.
Examples include:
LT_ISO639
LT_ISO639|LT_ISO3166
LT_ILLEGAL
LT_PRIVATE_USE
LT_IANA|LT_EXTRA
LT_IANA_DEPRECATED
LT_MULTIPLE|LT_ISO3166|LT_EXTRA
LT_ISO639|LT_ISO3166|LT_IANA|LT_EXTRA
public String errorMessage()
Licenced under the Apache License, Version 2.0