[PATCH] kernel32: Respect the LANG environment variable on Mac OS.

Ken Thomases ken at codeweavers.com
Fri Nov 27 00:24:21 CST 2009


On Nov 26, 2009, at 12:31 AM, Vitaliy Margolen wrote:

> Ken Thomases wrote:
>> Setting LC_ALL would achieve that, plus override the various other  
>> locale
>> categories. Set LANG is the wrong approach, in my opinion.
>
> However this is not the way Wine works on all other platforms.

Sure it is, if you consider the user preferences to be setting the  
LC_* variables.  On Linux, if the LC_* variables are set, then setting  
LANG does nothing.

LANG is, always and everywhere, a fallback, not an override.  This is  
true for how Wine works on Linux and Mac OS X and everywhere else.  I  
see no inconsistency.


On Nov 26, 2009, at 12:58 AM, Dmitry Timoshkov wrote:

> "Ken Thomases" <ken at codeweavers.com> wrote:
>
>> If you as a user want to override the language that Wine displays,
>> you can set LC_MESSAGES in your environment rather than LANG.
>> Setting LC_ALL would achieve that, plus override the various other
>> locale categories.  Set LANG is the wrong approach, in my opinion.
>
> In the most cases what user wants is not just change the UI language
> (which setting the LC_MESSAGES does) but also change the locale (i.e.
> input/output code page), that's where LANG should be used.

No, that's where setting LC_ALL should be used.


> LC_MESSAGES hack adds more confusion IMO than really helps.

Except that the vast, vast majority of Mac users will never touch (or  
even think about) the LANG or LC_* variables.  For them, the current  
code does the right thing, even for the case where their preferred  
language is set to something other than their formats region.  Letting  
LANG override their system settings would produce incorrect results  
for those users and force them to think about and use LANG or LC_ALL  
where they otherwise wouldn't.

I see no upside at all to changing LANG into an override where that's  
not how it functions in any other context.

Regards,
Ken




More information about the wine-devel mailing list