Language Identifiers

Language Identifiers

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.

IdentifierLanguage
0x0000Language Neutral
0x007fThe language for the invariant locale (LOCALE_INVARIANT). See MAKELCID.
0x0400Process or User Default Language
0x0800System Default Language
0x0436Afrikaans
0x041cAlbanian
0x0401Arabic (Saudi Arabia)
0x0801Arabic (Iraq)
0x0c01Arabic (Egypt)
0x1001Arabic (Libya)
0x1401Arabic (Algeria)
0x1801Arabic (Morocco)
0x1c01Arabic (Tunisia)
0x2001Arabic (Oman)
0x2401Arabic (Yemen)
0x2801Arabic (Syria)
0x2c01Arabic (Jordan)
0x3001Arabic (Lebanon)
0x3401Arabic (Kuwait)
0x3801Arabic (U.A.E.)
0x3c01Arabic (Bahrain)
0x4001Arabic (Qatar)
0x042bWindows 2000/XP: Armenian. This is Unicode only.
0x042cAzeri (Latin)
0x082cAzeri (Cyrillic)
0x042dBasque
0x0423Belarusian
0x0402Bulgarian
0x0455Burmese
0x0403Catalan
0x0404Chinese (Taiwan)
0x0804Chinese (PRC)
0x0c04Chinese (Hong Kong SAR, PRC)
0x1004Chinese (Singapore)
0x1404Windows 98/Me, Windows 2000/XP: Chinese (Macau SAR)
0x041aCroatian
0x0405Czech
0x0406Danish
0x0465Windows XP: Divehi. This is Unicode only.
0x0413Dutch (Netherlands)
0x0813Dutch (Belgium)
0x0409English (United States)
0x0809English (United Kingdom)
0x0c09English (Australian)
0x1009English (Canadian)
0x1409English (New Zealand)
0x1809English (Ireland)
0x1c09English (South Africa)
0x2009English (Jamaica)
0x2409English (Caribbean)
0x2809English (Belize)
0x2c09English (Trinidad)
0x3009Windows 98/Me, Windows 2000/XP: English (Zimbabwe)
0x3409Windows 98/Me, Windows 2000/XP: English (Philippines)
0x0425Estonian
..................

 

The following three combinations of usPrimaryLanguage and usSubLanguage have special meaning.

Primary language identifierSublanguage identifierMeaning
LANG_NEUTRALSUBLANG_NEUTRALLanguage neutral
LANG_NEUTRALSUBLANG_DEFAULTUser default language
LANG_NEUTRALSUBLANG_SYS_DEFAULTSystem default language

 

 

MAKELANGID

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值