Win32 API for getting the language(localization info) of the OS?

后端 未结 2 829
臣服心动
臣服心动 2020-12-30 05:58

Can anybody please help me with how to get the language(english,chinese etc) of Windows OS through win32 API(C/C++)??

Thanks, Sourabh

2条回答
  •  臣服心动
    2020-12-30 06:40

    You can get the default user locale (which I think is what you're asking) using GetUserDefaultLCID. This will give you an ID which can be used to determine the culture. See here for a table containing IDs and the cultures they represent.

    For Vista or Windows 7, Microsoft recommend GetUserDefaultLocaleName.

提交回复
热议问题