views:

668

answers:

2

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  A: 

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.

Xiaofu
+4  A: 

If you're asking about "Which language the OS menus and dialogs are dispalyed in" (i.e. which MUI - Multilingual User Interface kit - is installed), use the following:

More info:

MaxVT
And then use GetLocaleInfo with LOCALE_SENGLANGUAGE to obtain ISO 639 from LANGID.
Yakeen
I suspect this is nearer to what the OP was asking, and a much more comprehensive answer than mine.
Xiaofu