Language ID

Language ID

Language ID and Code Pages

  • Language ID and Code Page are different concept.
  • The language determines the text and data formatting conventions.
  • A code page is a character set, which can include numbers, punctuation marks, and other glyphs.
  • Different languages might use different code pages.
  • Different languages can use the same code pages: For example, the ANSI code page 1252 is used for English and most European languages.

Language Identifiers

A language identifier is constructed using the MAKELANGID macro.

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

Language ID in resource file

LANGUAGE Primary Language ID, SubLanguage ID   

Sample:

LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED

Language ID Constants

$(WindowsSdkDir)Include\WinNT.h

Common Use Language ID

IDDec.Primary languagePrim. lang. symbolSublanguageSublang. symbolCode Page
0x08042052Chinese (zh)LANG_CHINESE_SIMPLIFIEDSimplified (Hans)SUBLANG_CHINESE_SIMPLIFIED936
0x04041028Chinese (zh)LANG_CHINESE_TRADITIONALTraditional (Hant)SUBLANG_CHINESE_TRADITIONAL950
0x04051029Czech (cs)LANG_CZECHCzech Republic (CZ)SUBLANG_CZECH_CZECH_REPUBLIC1250
0x04061030Danish (da)LANG_DANISHDenmark (DK)SUBLANG_DANISH_DENMARK1252
0x04131043Dutch (nl)LANG_DUTCHNetherlands (NL)SUBLANG_DUTCH1252
0x04091033English (en)LANG_ENGLISHUnited States (US)SUBLANG_ENGLISH_US1252
0x040B1035Finnish (fi)LANG_FINNISHFinland (FI)SUBLANG_FINNISH_FINLAND1252
0x040c1036French (fr)LANG_FRENCHFrance (FR)SUBLANG_FRENCH1252
0x04071031German (de)LANG_GERMANGermany (DE)SUBLANG_GERMAN1252
0x04081032Greek (el)LANG_GREEKGreece (GR)SUBLANG_GREEK_GREECE1253
0x040E1038Hungarian (hu)LANG_HUNGARIANHungary (HU)SUBLANG_HUNGARIAN_HUNGARY1250
0x040D1037Hebrew (he)LANG_HEBREWIsrael (IL)SUBLANG_HEBREW_ISRAEL1255
0x04101040Italian (it)LANG_ITALIANItaly (IT)SUBLANG_ITALIAN1252
0x04111041Japanese (ja)LANG_JAPANESEJapan (JP)SUBLANG_JAPANESE_JAPAN932
0x04121042Korean (ko)LANG_KOREANKorea (KR)SUBLANG_KOREAN949
0x04141044Norwegian (no)LANG_NORWEGIANBokmål, Norway (NO)SUBLANG_NORWEGIAN_BOKMAL1252
0x04151045Polish (pl)LANG_POLISHPoland (PL)SUBLANG_POLISH_POLAND1250
0x04161046Portuguese (pt)LANG_PORTUGUESEBrazil (BR)SUBLANG_PORTUGUESE_BRAZILIAN1252
0x08162070Portuguese (pt)LANG_PORTUGUESEPortugal (PT)SUBLANG_PORTUGUESE1252
0x04191049Russian (ru)LANG_RUSSIANRussia (RU)SUBLANG_RUSSIAN_RUSSIA1251
0x040A1034Spanish (es)LANG_SPANISHSpain, Traditional Sort (ES)SUBLANG_SPANISH1252
0x041D1053Swedish (sv)LANG_SWEDISHSweden (SE)SUBLANG_SWEDISH1252
0x041F1055Turkish (tr)LANG_TURKISHTurkey (TR)SUBLANG_TURKISH_TURKEY1254

Reference Document

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值