LANGID LANGID = GetSystemDefaultLangID ();
For example: 2052
LangID = Getuserdefaultlangid ();
For example: 2052
CString Msgfile;
Msgfile.format (_t ("%04XL"), LangID);
For example: 0804
TCHAR name[4*1024]={0};
GetLocaleInfo (Locale_system_default, Locale_snativelangname,
Name, sizeof (name)/sizeof (TCHAR));
For example: Chinese (Simplified)
LCID lcid=getsystemdefaultlcid ();
For example: 2052
UINT ACP=GETACP ();
For example: 936
HInstance M_hlangdll = NULL;
WORD Wlangid=primarylangid (:: GetSystemDefaultLangID ());
Switch (wlangid)
{
Case Lang_chinese:
M_hlangdll=afxloadlibrary (_t ("Chinese.DLL"));
Break
Default
M_hlangdll=afxloadlibrary (_t ("English.DLL"));
Break
}
if (!m_hlangdll)
{
AfxMessageBox (_t ("Unable to load resource Dll!\n\ruse self-resource!"));
}
Else
{
AfxSetResourceHandle (M_hlangdll);
}
FreeLibrary (M_hlangdll);
Related definition reference: WinNT.h
//
Language IDs.
//
The following two combinations of primary language ID and
Sublanguage ID have special semantics:
//
Primary Language ID sublanguage ID Result
// ------------------- --------------- ------------------------
Lang_neutral sublang_neutral Language NEUTRAL
Lang_neutral Sublang_default User DEFAULT language
Lang_neutral Sublang_sys_default System DEFAULT language
Lang_invariant sublang_neutral invariant locale
//
//
Primary language IDs.
//
#define Lang_neutral 0x00
#define Lang_invariant 0x7f
#define Lang_afrikaans 0x36
#define Lang_albanian 0x1c
#define LANG_ARABIC 0x01
#define Lang_armenian 0x2b
#define Lang_assamese 0x4d
#define Lang_azeri 0x2c
#define Lang_basque 0x2d
#define Lang_belarusian 0x23
#define Lang_bengali 0x45
#define Lang_bulgarian 0x02
#define Lang_catalan 0x03
#define Lang_chinese 0x04
#define Lang_croatian 0x1a
#define Lang_czech 0x05
#define Lang_danish 0x06
#define LANG_DIVEHI 0X65
#define Lang_dutch 0x13
#define Lang_english 0x09
#define Lang_estonian 0x25
#define Lang_faeroese 0x38
#define LANG_FARSI 0x29
#define Lang_finnish 0x0b
#define Lang_french 0x0c
#define Lang_galician 0x56
#define Lang_georgian 0x37
#define Lang_german 0x07
#define Lang_greek 0x08
#define Lang_gujarati 0x47
#define LANG_HEBREW 0x0d
#define Lang_hindi 0x39
#define Lang_hungarian 0x0e
#define LANG_ICELANDIC 0x0f
#define Lang_indonesian 0x21
#define Lang_italian 0x10
#define Lang_japanese 0x11
#define Lang_kannada 0x4b
#define Lang_kashmiri 0x60
#define Lang_kazak 0x3f
#define Lang_konkani 0x57
#define Lang_korean 0x12
#define LANG_KYRGYZ 0x40
#define Lang_latvian 0x26
#define Lang_lithuanian 0x27
#define Lang_macedonian 0x2f//The Former Yugoslav Republic of Macedonia
#define Lang_malay 0x3e
#define Lang_malayalam 0x4c
#define Lang_manipuri 0x58
#define Lang_marathi 0x4e
#define Lang_mongolian 0x50
#define Lang_nepali 0x61
#define Lang_norwegian 0x14
#define Lang_oriya 0x48
#define Lang_polish 0x15
#define Lang_portuguese 0x16
#define Lang_punjabi 0x46
#define Lang_romanian 0x18
#define Lang_russian 0x19
#define Lang_sanskrit 0x4f
#define Lang_serbian 0x1a
#define Lang_sindhi 0x59
#define LANG_SLOVAK 0x1b
#define Lang_slovenian 0x24
#define Lang_spanish 0x0a
#define Lang_swahili 0x41
#define Lang_swedish 0x1d
#define LANG_SYRIAC 0x5a
#define LANG_TAMIL 0x49
#define Lang_tatar 0x44
#define Lang_telugu 0x4a
#define LANG_THAI 0x1e
#define Lang_turkish 0x1f
#define Lang_ukrainian 0x22
#define LANG_URDU 0x20
#define Lang_uzbek 0x43
#define Lang_vietnamese 0X2A
//
Sublanguage IDs.
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/vc/
The name immediately following sublang_ dictates which primary
Language ID that sublanguage ID can is combined with to form a
Valid language ID.
//
#define Sublang_neutral 0x00//Language NEUTRAL
#define SUBLANG_DEFAULT 0x01//user DEFAULT
#define SUBLANG_SYS_DEFAULT 0x02//System DEFAULT
#define Sublang_arabic_saudi_arabia 0x01//ARABIC (SAUDI Arabia)
#define SUBLANG_ARABIC_IRAQ 0x02//ARABIC (IRAQ)
#define SUBLANG_ARABIC_EGYPT 0x03//ARABIC (EGYPT)
#define SUBLANG_ARABIC_LIBYA 0x04//ARABIC (LIBYA)
#define Sublang_arabic_algeria 0x05//ARABIC (Algeria)
#define SUBLANG_ARABIC_MOROCCO 0x06//ARABIC (Morocco)
#define Sublang_arabic_tunisia 0x07//ARABIC (Tunisia)
#define Sublang_arabic_oman 0x08//ARABIC (Oman)
#define Sublang_arabic_yemen 0x09//ARABIC (Yemen)
#define Sublang_arabic_syria 0x0a//ARABIC (Syria)
#define Sublang_arabic_jordan 0x0b//ARABIC (JORDAN)
#define Sublang_arabic_lebanon 0x0c//ARABIC (Lebanon)
#define SUBLANG_ARABIC_KUWAIT 0x0d//ARABIC (Kuwait)
#define SUBLANG_ARABIC_UAE 0x0e//ARABIC (U.A.E)
#define Sublang_arabic_bahrain 0x0f//ARABIC (BAHRAIN)
#define Sublang_arabic_qatar 0x10//ARABIC (Qatar)
#define Sublang_azeri_latin 0x01//AZERI (Latin)
#define Sublang_azeri_cyrillic 0x02//AZERI (Cyrillic)
#define Sublang_chinese_traditional 0x01//Chinese (Taiwan)
#define Sublang_chinese_simplified 0x02/Chinese (PR country)
#define Sublang_chinese_hongkong 0x03//Chinese (S.A.R., p.r.c.)
#define Sublang_chinese_singapore 0x04//Chinese (SINGAPORE)
#define SUBLANG_CHINESE_MACAU 0x05//Chinese (MACAU S.A.R.)
#define Sublang_dutch 0x01//DUTCH
#define Sublang_dutch_belgian 0x02//DUTCH (BELGIAN)
#define SUBLANG_ENGLISH_US 0x01//中文版 (USA)
#define SUBLANG_ENGLISH_UK 0x02//中文版 (UK)
#define Sublang_english_aus 0x03//中文版 (Australian)
#define Sublang_english_can 0x04//中文版 (Canadian)
#define SUBLANG_ENGLISH_NZ 0x05//中文版 (New Zealand)
#define Sublang_english_eire 0x06//中文版 (Irish)
#define Sublang_english_south_africa 0x07//中文版 (SOUTH AFRICA)
#define Sublang_english_jamaica 0x08//中文版 (Jamaica)
#define Sublang_english_caribbean 0x09//中文版 (CARIBBEAN)
#define SUBLANG_ENGLISH_BELIZE 0x0a//中文版 (BELIZE)
#define Sublang_english_trinidad 0x0b//中文版 (Trinidad)
#define SUBLANG_ENGLISH_ZIMBABWE 0x0c//中文版 (Zimbabwe)
#define Sublang_english_philippines 0x0d//中文版 (Philippines)
#define Sublang_french 0x01//FRENCH
#define Sublang_french_belgian 0x02//FRENCH (BELGIAN)
#define Sublang_french_canadian 0x03//FRENCH (Canadian)
#define SUBLANG_FRENCH_SWISS 0x04//FRENCH (SWISS)
#define Sublang_french_luxembourg 0x05//FRENCH (Luxembourg)
#define SUBLANG_FRENCH_MONACO 0x06//FRENCH (MONACO)
#define Sublang_german 0x01//GERMAN
#define SUBLANG_GERMAN_SWISS 0x02//GERMAN (SWISS)
#define Sublang_german_austrian 0x03//GERMAN (Austrian)
#define Sublang_german_luxembourg 0x04//GERMAN (Luxembourg)
#define Sublang_german_liechtenstein 0x05//GERMAN (Liechtenstein)
#define Sublang_italian 0x01//Italian
#define SUBLANG_ITALIAN_SWISS 0x02//Italian (SWISS)
#if _win32_winnt >= 0x0501
#define Sublang_kashmiri_sasia 0x02/Kashmiri (South Asia)
#endif
#define Sublang_kashmiri_india 0x02//For app compatibility
#define Sublang_korean 0x01//Korean (Extended Wansung)
#define Sublang_lithuanian 0x01//Lithuanian
#define Sublang_malay_malaysia 0x01//Malay (Malaysia)
#define Sublang_malay_brunei_darussalam 0x02//Malay (Brunei Darussalam)
#define Sublang_nepali_india 0x02//Nepali (INDIA)
#define Sublang_norwegian_bokmal 0x01//Norwegian (Bokmal)
#define Sublang_norwegian_nynorsk 0x02//Norwegian (Nynorsk)
#define Sublang_portuguese 0x02//Portuguese
#define Sublang_portuguese_brazilian 0x01//Portuguese (Brazilian)
#define Sublang_serbian_latin 0x02//Serbian (Latin)
#define Sublang_serbian_cyrillic 0x03//Serbian (Cyrillic)
#define Sublang_spanish 0x01//Spanish (Castilian)
#define Sublang_spanish_mexican 0x02//Spanish (Mexican)
#define Sublang_spanish_modern 0x03//Spanish (Spain)
#define Sublang_spanish_guatemala 0x04//Spanish (Guatemala)
#define Sublang_spanish_costa_rica 0x05//Spanish (COSTA RICA)
#define Sublang_spanish_panama 0x06//Spanish (PANAMA)
#define Sublang_spanish_dominican_republic 0x07//Spanish (Dominican Republic)
#define Sublang_spanish_venezuela 0x08//Spanish (Venezuela)
#define Sublang_spanish_colombia 0x09//Spanish (Colombia)
#define Sublang_spanish_peru 0x0a//Spanish (PERU)
#define Sublang_spanish_argentina 0x0b//Spanish (Argentina)
#define Sublang_spanish_ecuador 0x0c//Spanish (Ecuador)
#define Sublang_spanish_chile 0x0d//Spanish (CHILE)
#define Sublang_spanish_uruguay 0x0e//Spanish (URUGUAY)
#define Sublang_spanish_paraguay 0x0f//Spanish (Paraguay)
#define Sublang_spanish_bolivia 0x10//Spanish (Bolivia)
#define Sublang_spanish_el_salvador 0x11//Spanish (EL SALVADOR)
#define Sublang_spanish_honduras 0x12//Spanish (Honduras)
#define SUBLANG_SPANISH_NICARAGUA 0x13//Spanish (Nicaragua)
#define Sublang_spanish_puerto_rico 0x14//Spanish (PUERTO RICO)
#define Sublang_swedish 0x01//Swedish
#define Sublang_swedish_finland 0x02//Swedish (Finland)
#define Sublang_urdu_pakistan 0x01//URDU (Pakistan)
#define Sublang_urdu_india 0x02//URDU (INDIA)
#define Sublang_uzbek_latin 0x01//Uzbek (Latin)
#define Sublang_uzbek_cyrillic 0x02//Uzbek (Cyrillic)