Class LCIDUtil

    • Constructor Detail

      • LCIDUtil

        public LCIDUtil()
    • Method Detail

      • getDescriptors

        public static List<net.sf.okapi.common.LCIDUtil.LCIDDescr> getDescriptors()
        Gets a list of all descriptors for the registered LCID.
        Returns:
        a list of all descriptors for the registered LCID.
      • getTag

        public static String getTag​(int lcid)
        Gets the language tag for a given LCID.
        Parameters:
        lcid - the LCID value.
        Returns:
        the language tag found or an empty string
      • getLCID

        public static int getLCID​(String tag)
        Gets an LCID for a given language tag.
        Parameters:
        tag - the language tag to lookup.
        Returns:
        the LCID value found.
      • getTag

        public static String getTag​(LocaleId locId)
        Gets the language tag for a given locale id.
        Parameters:
        locId - the locale id to lookup.
        Returns:
        the language tag found, or an empty string.
      • getLCID

        public static int getLCID​(LocaleId locId)
        Gets the LCID for a given locale id.
        Parameters:
        locId - the locale id to lookup.
        Returns:
        the LCID value found, or 0 if nothing is found.
      • getLCID_asString

        public static String getLCID_asString​(LocaleId locId)
        Gets the LCID as a string, for a given locale id.
        Parameters:
        locId - the localie id to lookup.
        Returns:
        the LCID found, as a string.
      • getLocaleId

        public static LocaleId getLocaleId​(String tag)
        Creates a locale id for a given language tag.

        This method is the same as calling new LocaleId(tag).

        Parameters:
        tag - the language tag.
        Returns:
        a new locale id for the given language tag.
      • getLocaleId

        public static LocaleId getLocaleId​(int lcid)
        Creates a locale id for a given LCID value.
        Parameters:
        lcid - the LCID to lookup.
        Returns:
        a new locale id for the given LCID value.