Make wine honor LC_CTYPE and LC_MESSAGES

Shachar Shemesh wine-devel at
Sat Jul 17 03:04:24 CDT 2004

Alexandre Julliard wrote:

>Shachar Shemesh <wine-devel at> writes:
>>With my patch LC_CTYPE affects the "system default locale". LC_ALL,
>>LANGUAGE (a mistake, I think, but couldn't convince Alexandre), and
>>LANG affect the "user locale".
>Actually I agree that LANGUAGE is a mistake. What your original patch
>did was making the mistake even worse by adding LC_MESSAGES to the
>mix, and that is what I objected too. I'm perfectly happy with not
>taking LANGUAGE into account for the user locale, it should only be
>used for the UI language, just like LC_MESSAGES.
The reason my original patch was written the way it was is *because* 
"LANGUAGE" was there. I'm in the process of installing Windows MUI, so I 
can write a test case for how to change the UI language.

Do we actually query the user locale anywhere? The docs 
suggests that it is only used as a default for such things as the date 
format, time format, etc. However, on Unix these are controlled by 
separate environment variables, and even on Windows they are 
overrideable on a per-setting basis (through the regional settings 
control panel). It seems like the user locale is one of the most useless 
settings available, with everybody attributing the wrong functionality 
to it.

So it would appear that the correct thing to do is to create a list of 
mapping. In the following list, LC_ALL always overrides the list member, 
and LANG is always taken if the neither the list member nor LC_ALL are 
set. We already have:
LC_CTYPE -> system locale
none -> user locale (take LC_ALL, and if not set, LANG)
LC_COLLATE -> no setting (user-locale?)
LC_MONETARY -> Specific registry entries
LC_MESSAGES & LANGUAGE -> only settable on MUI versions of Windows
LC_NUMERIC -> Specific registry entries?
LC_MONETARY -> Specific registry entries
LC_PAPER -> Per printer setting
LC_MEASUREMENT -> Specific registry entries
LC_TIME -> specific registry entries.

I also have no idea what LC_IDENTIFICATION, LC_NAME or LC_ADDRESS mean.

Whenever I wrote "Specific registry entries" in the above table, I meant 
that it's taken from the user locale unless it's overridden by the 
registry. The best thing for us to do, I think, is to set the user 
locale according to LC_ALL, LC_COLLATE, LANG, and then query each of the 
other strings and set the registry according to them.


Shachar Shemesh
Lingnu Open Source Consulting ltd.

More information about the wine-devel mailing list