net.sf.okapi.common

## Class LCIDUtil

- java.lang.Object
- - net.sf.okapi.common.LCIDUtil

-     public class LCIDUtil
      extends java.lang.Object

  Converts Microsoft's LCID to Okapi LocaleId back and forth.
  See Also:
    Microsoft LCID Structure, LCID List, Microsoft LCID Structure

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LCIDUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.List<net.sf.okapi.common.LCIDUtil.LCIDDescr>` | `getDescriptors()` Gets a list of all descriptors for the registered LCID.
    `static java.lang.String` | `getLCID_asString(LocaleId locId)` Gets the LCID as a string, for a given locale id.
    `static int` | `getLCID(LocaleId locId)` Gets the LCID for a given locale id.
    `static int` | `getLCID(java.lang.String tag)` Gets an LCID for a given language tag.
    `static java.util.HashMap<java.lang.String,net.sf.okapi.common.LCIDUtil.LCIDDescr>` | `getLcidLookup()`
    `static LocaleId` | `getLocaleId(int lcid)` Creates a locale id for a given LCID value.
    `static LocaleId` | `getLocaleId(java.lang.String tag)` Creates a locale id for a given language tag.
    `static java.lang.String` | `getTag(int lcid)` Gets the language tag for a given LCID.
    `static java.lang.String` | `getTag(LocaleId locId)` Gets the language tag for a given locale id.
    `static java.util.HashMap<java.lang.Integer,net.sf.okapi.common.LCIDUtil.LCIDDescr>` | `getTagLookup()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LCIDUtil

          public LCIDUtil()

  - ### Method Detail

    - #### getDescriptors

          public static java.util.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 java.lang.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(java.lang.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 java.lang.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 java.lang.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(java.lang.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.

    - #### getTagLookup

          public static java.util.HashMap<java.lang.Integer,net.sf.okapi.common.LCIDUtil.LCIDDescr> getTagLookup()

    - #### getLcidLookup

          public static java.util.HashMap<java.lang.String,net.sf.okapi.common.LCIDUtil.LCIDDescr> getLcidLookup()