tags:

views:

49

answers:

3

Hi,

Language codes are in the form "en-US","de-DE" or "sl-SI" for English US, German and slovakian respectively. Whether there is any #define s present in PLATFORM SDK 6.1 for language codes. Its better if i got these values instead of using Hard coded strings in my program. Can anyone help me regarding this. Its better if i get the header file name to include. Thanks Santhosh

+2  A: 

No. There are no defined strings - you are supposed to use string literals for these.

Koert
I have a application which loads language specific dlls. I am using "GetUserDefaultLocaleName()" API for getting the user locale. This is returning values in the above said Format. What i can do in that case. Plz Help!!
Santhosha
+1  A: 

You could use GetUserDefaultLCID() instead. That's a number, you can compare it with the value produced by the MAKELCID macro.

Hans Passant
This API is deprecated in OS Windows Vista and Above.. I need the API in OS's Windows Vista and above!!
Santhosha
You already found it, I thought you didn't like it. No, there are no usable #defines in the SDK.
Hans Passant
A: 

There are no # defines present for language codes. We can use the function LocaleNameToLCID() to get the language ID for given language code.

Thanks all for help!!

Santhosha