"Shachar Shemesh" wine-devel@shemesh.biz wrote:
2003-01-05 Shachar Shemesh winecode@sun.consumer.org.il Change the SUBLANG_NEUTRAL clause in all winelib applications to SUBLANG_DEFAULT, as they should be.
I vote to revert that patch.
Then perhaps I should explain why I submitted this patch.
The problem was with notepad. If my locale said "he_IL", it would display the menues in Danish. The reason was that, failing to find Hebrew locales, and failing to find LANG_ENGLISH, SUBLANG_DEFAULT locales, it loaded the first one available.
Then probably you had to replace SUBLANG_NEUTRAL by SUBLANG_DEFAULT only for LANG_ENGLISH resources. Anyway the patch I just set adds LANG_ENGLISH,SUBLANG_NEUTRAL to the fallback list, since my test under win2k shows that.
I then proceeded to research what the situation on Windows was, and the categorical answer was that Visual Studio would not let you create resources with SUBLANG_NEUTRAL. SUBLANG_DEFAULT was the only option. It is for that reason that I believe that SUBLANG_NEUTRAL should only be used as a search qualifier, never as an actual resource.
If VS wouldn't allow you to add Hebrew resources you would decide that Hebrew language is forbidden in resources?
Now, looking at the code searching path I see: /* 2. specified language with neutral sublanguage */ pos = push_language( list, pos, MAKELANGID( PRIMARYLANGID(info->Language), SUBLANG_NEUTRAL ) );
As far as my understanding goes, this should match the LANG_FRENCH with ANY sublang.
No, it adds match for LANG_FRENCH,SUBLANG_NEUTRAL *only*.
Why doesn't this rule correctly find LANG_FRENCH, SUBLANG_FRENCH_CANADIAN?
Because there is no resources marked for that language dialect.
The MSDN is a little hazy on the subject of SUBLANG_NEUTRAL. It has always been my understanding that we should be treating SUBLANG_NEUTRAL as a wildcard. Is that wrong?
The best way is to write a test program. I did it. Did you?