Class LanguageRegistryUtil


  • public class LanguageRegistryUtil
    extends Object
    Utility class for language registry.
    • Method Detail

      • init

        public static void init()
        Loads the class in the classloader in order to initialize static members in LanguageRegistry. Call this before using the class in order to avoid a slight performance hit on first use.
      • isValidLanguageTag

        public static boolean isValidLanguageTag​(String tag)
        Determines if the tag is a valid language tag registered with BCP-47. If the tag contains any extensions or private-use subtags, it is not considered valid.
        Parameters:
        tag - the tag
        Returns:
        true or false