Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Detect user's language for user interface Pin
Nemanja Trifunovic14-Apr-08 5:42
Nemanja Trifunovic14-Apr-08 5:42 
GeneralRe: Detect user's language for user interface Pin
Nemanja Trifunovic14-Apr-08 5:36
Nemanja Trifunovic14-Apr-08 5:36 
QuestionRe: Detect user's language for user interface [modified] Pin
Moak14-Apr-08 5:59
Moak14-Apr-08 5:59 
GeneralRe: Detect user's language for user interface Pin
Nemanja Trifunovic14-Apr-08 7:39
Nemanja Trifunovic14-Apr-08 7:39 
GeneralRe: Detect user's language for user interface Pin
Moak14-Apr-08 8:10
Moak14-Apr-08 8:10 
GeneralRe: Detect user's language for user interface Pin
Nemanja Trifunovic14-Apr-08 8:21
Nemanja Trifunovic14-Apr-08 8:21 
GeneralRe: Detect user's language for user interface Pin
Moak14-Apr-08 8:38
Moak14-Apr-08 8:38 
GeneralRe: Detect user's language for user interface Pin
Nemanja Trifunovic14-Apr-08 9:29
Nemanja Trifunovic14-Apr-08 9:29 
Moak wrote:
Well, thanks for taking the time to explain!


You're welcome. I know international programming can be frustrating - after all I worked in language/localization industry 7 years before I finally had enough Smile | :)


Moak wrote:
in the control panel -> Regional and Language Options -> tabs (Regional/Languages/Advanced) the language is set to "English (United Kingdom)",


OK. If you read carefuly the explanation on that tab, you'll see that it sets the "Language for non-Unicode programs", or "system locale". What it does is determine which code page is used for multibyte ("ANSI") characters. For instance, when you use MultiByteToWideChar function, and set the CodePage parameter to CP_ACP, it will be this setting that decides from which multibyte encoding we are converting to Unicode. Mind you, all Windows API functions internaly do that if the application does not compile as UNICODE. This value gets returned by GetSystemDefaultLangID as you already noticed.

However, GetUserDefaultUILanguage does not look into this setting at all! It returns the language in which the UI controls of your OS are rendered (and MFC correctly looks at that one first - after all you would want your application to e displayed in the same language as the OS). This setting you can change on Windows XP Pro only if you have MUI pack installed, and in that case you'll have a combo box "Language used in menues and dialogs" displayed in the "Language" tab in the Control Panel "Regional and Language Options". Otherwise, it is just predetermined by the version of Windows you installed (En-UK, or En-US) and you can't change it.

Hope it is a little clearer now Smile | :)


GeneralRe: Detect user's language for user interface Pin
Randor 14-Apr-08 8:05
professional Randor 14-Apr-08 8:05 
GeneralRe: Detect user's language for user interface Pin
Nemanja Trifunovic14-Apr-08 8:31
Nemanja Trifunovic14-Apr-08 8:31 
GeneralRe: Detect user's language for user interface Pin
Randor 14-Apr-08 9:00
professional Randor 14-Apr-08 9:00 
GeneralRe: Detect user's language for user interface Pin
Randor 14-Apr-08 9:02
professional Randor 14-Apr-08 9:02 
GeneralProblem customizing tree control [modified] Pin
Jim Crafton14-Apr-08 4:31
Jim Crafton14-Apr-08 4:31 
GeneralRe: Problem customizing tree control Pin
enhzflep14-Apr-08 5:02
enhzflep14-Apr-08 5:02 
GeneralRe: Problem customizing tree control Pin
Jim Crafton14-Apr-08 5:08
Jim Crafton14-Apr-08 5:08 
GeneralRe: Problem customizing tree control Pin
Jim Crafton14-Apr-08 5:11
Jim Crafton14-Apr-08 5:11 
GeneralRe: Problem customizing tree control [modified] Pin
enhzflep14-Apr-08 5:49
enhzflep14-Apr-08 5:49 
GeneralFind All Window Pin
john563214-Apr-08 3:52
john563214-Apr-08 3:52 
GeneralRe: Find All Window Pin
JudyL_MD14-Apr-08 4:10
JudyL_MD14-Apr-08 4:10 
GeneralRe: Find All Window Pin
john563214-Apr-08 4:14
john563214-Apr-08 4:14 
GeneralRe: Find All Window Pin
JudyL_MD14-Apr-08 4:28
JudyL_MD14-Apr-08 4:28 
QuestionRe: Find All Window Pin
David Crow14-Apr-08 4:13
David Crow14-Apr-08 4:13 
QuestionFont/FontSize Pin
C++NewBe14-Apr-08 2:34
C++NewBe14-Apr-08 2:34 
GeneralRe: Font/FontSize Pin
Cedric Moonen14-Apr-08 2:38
Cedric Moonen14-Apr-08 2:38 
GeneralRe: Font/FontSize Pin
CPallini14-Apr-08 3:27
mveCPallini14-Apr-08 3:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.