|
-
June 24th, 2003, 01:25 AM
#1
Get OS Language
Hi,
I need to get the installed OS Language. I don't need the default Locale Language. I installed Windows 2000 English in my m/c.
Later i changed the default Locale to Japanese.
So when i check for the OS Language, i need to get the English as the answer.
//I tried the follwing things. But these are giving only the default
//Locale Language. I need the installed OS Language.
LANGID lgid =GetSystemDefaultLangID();
LCUD lcid2 = PRIMARYLANGID(lcid );
LCID lcid = GetSystemDefaultLCID();
How can i get the OS Language?.
Thanks in Advance
-
June 24th, 2003, 02:43 AM
#2
Have you looked at GetLocaleInfo(...)
passing in:
LOCALE_SYSTEM_DEFAULT (1st param)
LOCALE_NOUSEROVERRIDE | LOCALE_IDEFAULTLANGUAGE (2nd param)
etc...
-
June 24th, 2003, 02:56 AM
#3
if the previous post still returns the default locale you've set then you might also want to try...
LOCALE_SNATIVELANGNAME | LOCALE_NOUSEROVERRIDE and see if that works...
-
June 24th, 2003, 03:03 AM
#4
I tried GetLocaleInfo too. But it is also giving the default language set in the Regional Settings.
Actually i need the OS installed language.
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT ,
LOCALE_NOUSEROVERRIDE | LOCALE_IDEFAULTLANGUAGE ,szCData, 255 );
Can anybody know it how can we get the OS installed language.
-
June 24th, 2003, 03:09 AM
#5
I tried with
LOCALE_SNATIVELANGNAME | LOCALE_NOUSEROVERRIDE.
Still it shows the default regional settings option - Japanese.
I think GetLocaleInfo will always give the default Regional Settings Option.
Is there any other API to get the language of the installed Windows 2000.
Thanks in Advance
-
June 24th, 2003, 03:22 AM
#6
Hmm not really sure, but while your waiting for maybe another answer you can look here (or ask there)..
http://www.microsoft.com/globaldev/DrIntl/default.mspx
here's article 4 and a index that lists function calls etc:
http://www.microsoft.com/globaldev/r...caletable.mspx
You might want to try the call
GetSystemDefaultUILanguage(...) since that is 'not' changable (or so the chart implies) and should the LANGID of english for your install.
-
June 24th, 2003, 06:10 AM
#7
HI Mick,
So far i couldn't get it.
I tried to call GetSystemDefaultUILanguage() but it is giving compile time error. I included <Windows.h> and <Winnls.h>.
But still it is giving error. I am lalso ooking into the other options u said before.
Pls reply if u got any clue.
Do i have to install Platform SDK.?
Thanks & Regards
Cherian
-
June 24th, 2003, 06:23 AM
#8
Originally posted by cherian_2002
HI Mick,
So far i couldn't get it.
I tried to call GetSystemDefaultUILanguage() but it is giving compile time error. I included <Windows.h> and <Winnls.h>.
But still it is giving error. I am lalso ooking into the other options u said before.
Pls reply if u got any clue.
Do i have to install Platform SDK.?
Thanks & Regards
Cherian
Yes it's in the SDK..
You should get the SDK, because you'll be in the same boat when you try to use some other function down the line that's in the SDK
Otherwise you can use LoadLibrary and GetProcAddress...but just get the SDK 
WINBASEAPI
LANGID
WINAPI
GetSystemDefaultUILanguage(void);
EDIT: guess I should say LoadLibrary instead of LoadLib cause Sam will complain
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|