A language identifier is a standard international numeric abbreviation for the language in a country or geographical region. Each language has a unique language identifier (LANGID), a 16-bit value that consists of a primary language identifier and a sublanguage identifier. The LANGID is constructed using the MAKELANGID macro. The following illustration shows the format of the bits in a LANGID.
+-------------------------+-------------------------+ | SubLanguage ID | Primary Language ID | +-------------------------+-------------------------+ 15 10 9 0 bit
There are predefined language identifiers:
LANG_SYSTEM_DEFAULT, which identifies the system default language.
LANG_USER_DEFAULT, which identifies the language of the current user.
An application can retrieve the current language identifiers by using the GetSystemDefaultLangID and GetUserDefaultLangID functions.
For a list of language identifiers, see Table of Language Identifiers.
Table of Language Identifier
The following are language identifiers. They are composed of a primary language identifier and a sublanguage identifier.
The following identifiers were composed using the MAKELANGID macro.
Identifier | Language |
0x0000 | Language Neutral |
0x007f | The language for the invariant locale (LOCALE_INVARIANT). See MAKELCID. |
0x0400 | Process or User Default Language |
0x0800 | System Default Language |
0x0436 | Afrikaans |
0x041c | Albanian |
0x0401 | Arabic (Saudi Arabia) |
0x0801 | Arabic (Iraq) |
0x0c01 | Arabic (Egypt) |
0x1001 | Arabic (Libya) |
0x1401 | Arabic (Algeria) |
0x1801 | Arabic (Morocco) |
0x1c01 | Arabic (Tunisia) |
0x2001 | Arabic (Oman) |
0x2401 | Arabic (Yemen) |
0x2801 | Arabic (Syria) |
0x2c01 | Arabic (Jordan) |
0x3001 | Arabic (Lebanon) |
0x3401 | Arabic (Kuwait) |
0x3801 | Arabic (U.A.E.) |
0x3c01 | Arabic (Bahrain) |
0x4001 | Arabic (Qatar) |
0x042b | Windows 2000/XP: Armenian. This is Unicode only. |
0x042c | Azeri (Latin) |
0x082c | Azeri (Cyrillic) |
0x042d | Basque |
0x0423 | Belarusian |
0x0402 | Bulgarian |
0x0455 | Burmese |
0x0403 | Catalan |
0x0404 | Chinese (Taiwan) |
0x0804 | Chinese (PRC) |
0x0c04 | Chinese (Hong Kong SAR, PRC) |
0x1004 | Chinese (Singapore) |
0x1404 | Windows 98/Me, Windows 2000/XP: Chinese (Macau SAR) |
0x041a | Croatian |
0x0405 | Czech |
0x0406 | Danish |
0x0465 | Windows XP: Divehi. This is Unicode only. |
0x0413 | Dutch (Netherlands) |
0x0813 | Dutch (Belgium) |
0x0409 | English (United States) |
0x0809 | English (United Kingdom) |
0x0c09 | English (Australian) |
0x1009 | English (Canadian) |
0x1409 | English (New Zealand) |
0x1809 | English (Ireland) |
0x1c09 | English (South Africa) |
0x2009 | English (Jamaica) |
0x2409 | English (Caribbean) |
0x2809 | English (Belize) |
0x2c09 | English (Trinidad) |
0x3009 | Windows 98/Me, Windows 2000/XP: English (Zimbabwe) |
0x3409 | Windows 98/Me, Windows 2000/XP: English (Philippines) |
0x0425 | Estonian |
...... | ............ |
The following three combinations of usPrimaryLanguage and usSubLanguage have special meaning.
Primary language identifier | Sublanguage identifier | Meaning |
LANG_NEUTRAL | SUBLANG_NEUTRAL | Language neutral |
LANG_NEUTRAL | SUBLANG_DEFAULT | User default language |
LANG_NEUTRAL | SUBLANG_SYS_DEFAULT | System default language |
The MAKELANGID macro creates a language identifier from a primary language identifier and a sublanguage identifier.
WORD MAKELANGID( USHORT usPrimaryLanguage, // primary language identifier USHORT usSubLanguage // sublanguage identifier );
Parameters
usPrimaryLanguage
Specifies the primary language identifier. This parameter can be one in the list of primary language identifiers or a user-defined primary language.
For a user-defined language, usPrimaryLanguage is a value in the range 0x0200 to 0x03FF. All other values are reserved for system use.
usSubLanguage
Specifies the sublanguage identifier. This parameter can be a value from the list of sublanguage identifiers or a user-defined sublanguage.
For a user-defined sublanguage, usSubLanguage is a value in the range 0x20 to 0x3F. All other values are reserved for system use.
Return Values
The return value is a language identifier.