Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finding the current language of the system

Status
Not open for further replies.

tkop

Programmer
Jun 12, 2003
5
IL
hi,

how can I find the current language of the operating system. I don't want the default.

for example, if I have English and say some other language installed in my system.

I am using MFC.

please notice that word uses a default - this is not what I want.

In addition, I heard from a freind that I might be able to overcome this problem using unicode. if anyone has an explanation or a link please inform me.

thanks
 
>>In addition, I heard from a freind that I might be able to overcome this problem using unicode.

What problem are you talking about?


According to MSDN GetUserDefaultUILanguage retrieves the current user language.

Greetings,
Rick
 
thank you for the quick response, I'll check that function out (can't believe it evaded me).
The problem of finding the current language.

to explain what I need to do - I want to right an application that prints out the letters in the order which they appear on the keyboard.

for example:
qwertyuiop[]
asdfghjkl;'
zxcvbnm,./

maybe with unicode I can ignore the current OS language, and instead simply output the appropiate letters.

note that when the language of the system changes - I need to change the output accordingly
 
I think you're a little bit off track about the use of UNICODE.

UNICODE is not a multilingual language (that was probably poor English); UNICODE is just a way to store characters. There are several different versions of UNICODE, but the one supported by the VC compiler is the two bytes version. This means that one character occupies 2 bytes (instead of 1). With this, it's true that you can write Japaneese and such languages (since these are two byte characters), but there's still a codepage that's used by Windows to convert the bytes to actual characters.

Furthermore: The OS language will not do with what you want; it can be English with a french keyboard, for example. I think you'll do better if you search the MSDN for GetKeyboardLayout and the related functions.

Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top