A LANGID is a 16-bit value that is the combination of a primary and sublanguage ID. The bits are as follows:
Macros are provided for constructing a LANGID and extracting the fields:
LANGID creation/extraction macros include:
#define MAKELANGID(p, s) ((((USHORT)(s)) << 10) | (USHORT)(p))
#define PRIMARYLANGID(lgid) ((USHORT)(lgid) & 0x3ff)
#define SUBLANGID(lgid) ((USHORT)(lgid) >> 10)
#define LANGIDFROMLCID(lcid) ((WORD)(lcid))
The following three combinations of primary and sublanguage IDs have special meanings:
PRIMARYLANGID | SUBLANGID | Meaning |
---|---|---|
LANG_NEUTRAL | SUBLANG_NEUTRAL | Language neutral |
LANG_NEUTRAL | SUBLANG_SYS_DEFAULT | System default language |
LANG_NEUTRAL | SUBLANG_DEFAULT | User default language |
For primary language IDs, the range 0x200 to 0x3ff is user definable. The range 0x000 to 0x1ff is reserved for system use. The following table lists the primary LANGIDs supported by Automation:
Language | PRIMARYLANGID |
---|---|
Neutral | 0x00 |
Chinese | 0x04 |
Czech | 0x05 |
Danish | 0x06 |
Dutch | 0x13 |
English | 0x09 |
Finnish | 0x0b |
French | 0x0c |
German | 0x07 |
Greek | 0x08 |
Hungarian | 0x0e |
Icelandic | 0x0F |
Italian | 0x10 |
Japanese | 0x11 |
Korean | 0x12 |
Norwegian | 0x14 |
Polish | 0x15 |
Portuguese | 0x16 |
Russian | 0x19 |
Serbo Croatian | 0x1a |
Slovak | 0x1b |
Spanish | 0x0a |
Swedish | 0x1d |
Turkish | 0x1F |
For sublanguage IDs, the range 0x20 to 0x3f is user definable. The range 0x00 to 0x1f is reserved for system use. The following table lists the sublanguage IDs supported by Automation:
Sublanguage | SUBLANGID |
---|---|
Neutral | 0x00 |
Default | 0x01 |
System Default | 0x02 |
Chinese (Simplified) | 0x02 |
Chinese (Traditional) | 0x01 |
Dutch | 0x01 |
Dutch (Belgian) | 0x02 |
English (U.S.) | 0x01 |
English (U.K.) | 0x02 |
English (Australian) | 0x03 |
English (Canadian) | 0x04 |
English (Irish) | 0x06 |
English (New Zealand) | 0x05 |
French | 0x01 |
French (Belgian) | 0x02 |
French (Canadian) | 0x03 |
French (Swiss) | 0x04 |
German | 0x01 |
German (Swiss) | 0x02 |
German (Austrian) | 0x03 |
Greek | 0x01 |
Icelandic | 0x01 |
Italian | 0x01 |
Italian (Swiss) | 0x02 |
Japanese | 0x01 |
Korean | 0x01 |
Norwegian (Bokmal) | 0x01 |
Norwegian (Nynorsk) | 0x02 |
Portuguese | 0x02 |
Portuguese (Brazilian) | 0x01 |
Serbo Croatian (Latin) | 0x01 |
Spanish (Castilian)1 | 0x01 |
Spanish (Mexican) | 0x02 |
Spanish (Modern)1 | 0x03 |
Turkish | 0x01 |
1 The only difference between Spanish (Castilian) and Spanish (Modern) is the sort ordering. All of the LCType values are the same. |