Klasse WinNT.LocaleMacros

java.lang.Object
com.sun.jna.platform.win32.WinNT.LocaleMacros
Umschließende Schnittstelle:
WinNT

public static final class WinNT.LocaleMacros extends Object

A language ID is a 16 bit value which is the combination of a primary language ID and a secondary language ID. The bits are allocated as follows:

       +-----------------------+-------------------------+
       |     Sublanguage ID    |   Primary Language ID   |
       +-----------------------+-------------------------+
        15                   10 9                       0   bit
  

WARNING: This pattern isn't always follows, Serbina, Bosnian & Croation for example.

It is recommended that applications test for locale names or actual LCIDs.

Note that the LANG, SUBLANG construction is not always consistent. The named locale APIs (eg GetLocaleInfoEx) are recommended.

Language IDs do not exist for all locales

A locale ID is a 32 bit value which is the combination of a language ID, a sort ID, and a reserved area. The bits are allocated as follows:

   +-------------+---------+-------------------------+
   |   Reserved  | Sort ID |      Language ID        |
   +-------------+---------+-------------------------+
    31         20 19     16 15                      0   bit
 

WARNING: This pattern isn't always followed (es-ES_tradnl vs es-ES for example)

It is recommended that applications test for locale names or actual LCIDs.

  • Konstruktordetails

    • LocaleMacros

      public LocaleMacros()
  • Methodendetails

    • MAKELCID

      public static final WinDef.LCID MAKELCID(int lgid, int srtid)
      construct the locale id from a language id and a sort id.
      Parameter:
      lgid - language id
      srtid - sort id
      Gibt zurück:
      locale id derived from ldig and srtid
    • MAKESORTLCID

      public static final WinDef.LCID MAKESORTLCID(int lgid, int srtid, int ver)
      construct the locale id from a language id, sort id, and sort version.
      Parameter:
      lgid - locale id
      srtid - sort id
      ver - sort version
      Gibt zurück:
      locale id derviced from a language id, sort id, and sort version.
    • LANGIDFROMLCID

      public static final int LANGIDFROMLCID(WinDef.LCID lcid)
      extract the language id from a locale id.
      Parameter:
      lcid - locale id
      Gibt zurück:
      extracted language id
    • SORTIDFROMLCID

      public static final int SORTIDFROMLCID(WinDef.LCID lcid)
      extract the sort id from a locale id.
      Parameter:
      lcid - locale id
      Gibt zurück:
      extracted sort id
    • SORTVERSIONFROMLCID

      public static final int SORTVERSIONFROMLCID(WinDef.LCID lcid)
      extract the sort version from a locale id.
      Parameter:
      lcid - locale id
      Gibt zurück:
      extracted sort version
    • MAKELANGID

      public static final int MAKELANGID(int p, int s)
      Construct language id from a primary language id and a sublanguage id.
      Parameter:
      p - primary language ID
      s - sublanguage ID
      Gibt zurück:
      constructed language id
    • PRIMARYLANGID

      public static final int PRIMARYLANGID(int lgid)
      Extract primary language id from a language id.
      Parameter:
      lgid - language ID
      Gibt zurück:
      extracted primary language id
    • SUBLANGID

      public static final int SUBLANGID(int lgid)
      Extract sublanguage id from a language id.
      Parameter:
      lgid - language ID
      Gibt zurück:
      extracted sublanguage id