Windows Client Development-Preparing for internationalization

Source: Internet
Author: User

A good Windows client, of course, to do internationalization.

Let's start with a few functions today to get the language of the Windows operating system.

getsystemdefaultlcid function
This function is simple and has no parameters, only the return value:
Returns the locale identifier for the system locale

GetSystemDefaultUILanguage

Retrieves theLanguage identifier for  the systemDefault UI language of  theOperatingsystem, also known as  the "Install language" on  windows  vista  and  later . for  more  information , see  User  interface  language  management . 

GetUserDefaultUILanguage
Returns the language identifier for the user UI language for the current user. If the current user have not set a language, GetUserDefaultUILanguage returns the preferred language set for the system. If there is no preferred language set for the system and then the system default UI language (also known as "Install language ") is returned. For more information on the user UI language, see User Interface language Management.
Prototype:

LANGID GetUserDefaultUILanguage(void);
 #include <iostream>   #include <windows.h>   #pragma Comment (lib, "Kernel32.lib")  int  Main () {auto<    /span> iter = GetUserDefaultUILanguage ();    auto  iter2 = GetSystemDefaultUILanguage (); std :: cout  << iter << std :: Endl; std :: cout  << iter2 << std :: Endl; return  0 ;} //output:  //2052  //2052   

What is the return value LangID:

Arabic
1025
Arabic

Basque
1069
Ansi

Catalan
1027
Ansi

Chinese (Simplified)
2052
GB2312

Chinese (Traditional)
1028
Chinese-big 5

Czech
1029
Eastern European

Danish
1030
Ansi

Dutch
1043
Ansi

中文版 (states)
1033
Ansi

Finnish
1035
Ansi

French
1036
Ansi

German
1031
Ansi

Greek
1032
Greek

Hebrew
1037
Hebrew

Hungarian
1038
Eastern European

Italian
1040
Ansi

Japanese
1041
Shift-jis

Korean
1042
Johab

Norwegian
1044
Ansi

Polish
1045
Eastern European

Portuguese
2070
Ansi

Portuguese (Brazil)
1046
Ansi

Russian
1049
Russian

Slovakian
1051
Eastern European

Slovenian
1060
Eastern European

Spanish
3082
Ansi

Swedish
1053
Ansi

Turkish
1055
Turkish

Also, if this error occurs with VS:
Error LNK2001: unresolved external symbol [email protected]

Linker-Systems-subsystems-Select workbench

Windows Client Development-Preparing for internationalization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.