Class LangTag


  • public class LangTag
    extends java.lang.Object
    Language 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 int idxExtension
      Index of all extensions
      static int idxLanguage
      Index of the language part
      static int idxRegion
      Index of the region part
      static int idxScript
      Index of the script part
      static int idxVariant
      Index 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.