Package totalcross.util
Class LangTag
- java.lang.Object
-
- totalcross.util.LangTag
-
public class LangTag extends java.lang.ObjectLanguage tags: support for parsing and canonicalization of case. Grandfathered forms ("i-") are left untouched. Unsupported or syntactically illegal forms are handled in canonicalization by doing nothing.
-
-
Field Summary
Fields Modifier and Type Field Description static intidxExtensionIndex of all extensionsstatic intidxLanguageIndex of the language partstatic intidxRegionIndex of the region partstatic intidxScriptIndex of the script partstatic intidxVariantIndex of the variant part
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String[]parse(java.lang.String languageTag)Parse a langtag string and return it's parts in canonical case.
-
-
-
Field Detail
-
idxLanguage
public static final int idxLanguage
Index of the language part- See Also:
- Constant Field Values
-
idxScript
public static final int idxScript
Index of the script part- See Also:
- Constant Field Values
-
idxRegion
public static final int idxRegion
Index of the region part- See Also:
- Constant Field Values
-
idxVariant
public static final int idxVariant
Index of the variant part- See Also:
- Constant Field Values
-
idxExtension
public static final int idxExtension
Index of all extensions- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public static java.lang.String[] parse(java.lang.String languageTag)
Parse a langtag string and return it's parts in canonical case. See constants for the array contents. Parts not present cause a null in the return array.- Returns:
- Langtag parts, or null if the input string does not parse as a lang tag.
-
-