Klasse WinNT.LocaleMacros
- Umschließende Schnittstelle:
WinNT
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.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic final int
LANGIDFROMLCID
(WinDef.LCID lcid) extract the language id from a locale id.static final int
MAKELANGID
(int p, int s) Construct language id from a primary language id and a sublanguage id.static final WinDef.LCID
MAKELCID
(int lgid, int srtid) construct the locale id from a language id and a sort id.static final WinDef.LCID
MAKESORTLCID
(int lgid, int srtid, int ver) construct the locale id from a language id, sort id, and sort version.static final int
PRIMARYLANGID
(int lgid) Extract primary language id from a language id.static final int
SORTIDFROMLCID
(WinDef.LCID lcid) extract the sort id from a locale id.static final int
extract the sort version from a locale id.static final int
SUBLANGID
(int lgid) Extract sublanguage id from a language id.
-
Konstruktordetails
-
LocaleMacros
public LocaleMacros()
-
-
Methodendetails
-
MAKELCID
construct the locale id from a language id and a sort id.- Parameter:
lgid
- language idsrtid
- sort id- Gibt zurück:
- locale id derived from ldig and srtid
-
MAKESORTLCID
construct the locale id from a language id, sort id, and sort version.- Parameter:
lgid
- locale idsrtid
- sort idver
- sort version- Gibt zurück:
- locale id derviced from a language id, sort id, and sort version.
-
LANGIDFROMLCID
extract the language id from a locale id.- Parameter:
lcid
- locale id- Gibt zurück:
- extracted language id
-
SORTIDFROMLCID
extract the sort id from a locale id.- Parameter:
lcid
- locale id- Gibt zurück:
- extracted sort id
-
SORTVERSIONFROMLCID
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 IDs
- 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
-