Locales with the same language
dmitry at baikal.ru
Fri Jul 18 22:08:51 CDT 2003
"Vincent Béron" <vberon at mecano.gme.usherb.ca> wrote:
> W2k here, so this is valid only for it.
> LANGIDFROMLCID(GetLocaleThread()) returns 0x0c0c
> (FRENCH/FRENCH_CANADIAN) if I don't modify it via SetThreadLocale(), so
> I guess that's the default value for that system (equivalent to
> The results I got (for LoadString and FindResource) are different from
> yours though (still W2k). Here's for test.exe 0x0c0c:
> 1. LANG_NEUTRAL/SUBLANG_NEUTRAL
> 2. LANG_FRENCH/SUBLANG_FRENCH (==SUBLANG_DEFAULT)
> 3. LANG_FRENCH/SUBLANG_NEUTRAL
> 4. LANG_FRENCH/SUBLANG_FRENCH_CANADIAN
> 5. LANG_ENGLISH/SUBLANG_DEFAULT
> 6. LANG_ARABIC/SUBLANG_NEUTRAL
> So our #2, #3 and #5 are different. Are they dependant on the system
> default language? I believe it's more logical to look for the same
> language as the current locale before a harcoded English, else as soon
> as there's an English resource (DEFAULT or NEUTRAL) nothing else will be
> Here are the results for test.exe 0x0419 (RUSSIAN/DEFAULT) on the same
> 1. NEUTRAL/NEUTRAL
> 2. RUSSIAN/DEFAULT
> 3. FRENCH/DEFAULT
> 4. FRENCH/NEUTRAL
> 5. FRENCH/FRENCH_CANADIAN
> 6. ENGLISH/DEFAULT
> 7. ARABIC/NEUTRAL
> So we see it goes for current language id/default before system
> default/default, and current language id/neutral is not looked for at
> Dmitry, on which language have you tested your program under Windows?
I'm running English version of win2k pro with regional settings set to Russia.
Here are the results for 0x0c0c and 0x0419 on my system.
It seems that we have correct order of defaults in dlls/ntdll/resource.c
and my patch adding LANG_ENGLISH/SUBLANG_NEUTRAL is wrong. It would be
correct to add current thread locale language with neutral sublanguage
after #4 though.
More information about the wine-devel