kernel32: set sLanguage to LOCALE_SABBREVLANGUAGE to match Windows behavior

Jeff Zaroyko jeffzaroyko at
Tue Aug 25 04:25:38 CDT 2009

On Mon, Aug 24, 2009 at 9:22 PM, Alexandre Julliard<julliard at> wrote:
> Jeff Zaroyko <jeffzaroyko at> writes:
>> This fixes bug 15181, test included - passes on Windows 95, 2003, XP,
>> 2008, Vista and Windows 7 beta that I've tested.
>> From 52ff2d29ba9fbffbe8da46a7523338e8b946bbcd Mon Sep 17 00:00:00 2001
>> From: Jeff Zaroyko <jeffz at>
>> Date: Sun, 23 Aug 2009 12:38:17 +1000
>> Subject: kernel32: set sLanguage to LOCALE_SABBREVLANGUAGE to match Windows behavior
>> As a Profile entry and under Control Panel\International sLanguage is not
>> I've verified this is the case for 95, XP, 2003, 2008, Vista and Win 7.
>> With the sLanguage override set GetLocaleInfo for LOCALE_SLANGUAGE still
>> returns the LOCALE_SLANGUAGE string and not the "override", which suggests
>> that the Control Panel\International sLanguage override should be ignored
>> by GetLocaleInfo for LOCALE_SLANGUAGE.
> You shouldn't need any special casing for this, just change the existing
> mappings to use the appropriate value.

I don't see why the mapping should be changed, the one for
get_locale_value_name is correct.  The nls mappings are also correct.

What is incorrect is that GetLocaleInfo is reading the override from
the registry which it should not do hence the special casing where the
value of sLanguage as a profile or registry entry is not the
corresponding value for LOCALE_SLANGUAGE, but the corresponding value
for LOCALE_SABBREVLANGNAME.  In retrospect this is a side issue and
probably requires further questioning of the existing way overrides
are handled.

I've submitted a patch that creates the correct registry and profile
entry, which fixes the first issue and submit a test marked todo_wine
for the second issue.


More information about the wine-devel mailing list