I have problems displaying Wine's app in my locale (fr_CA). They seem to prefer to go to the English locale, although if launched with LANG=fr_FR wine notepad they will obey the French locale.
LANG=fr wine notepad will display a warning about the plurality of locales with "fr", but will display the app in French nonetheless.
I have a feeling it might be from dlls/kernels/nls/frc.nls, where both LOCALE_IDEFAULTLANGUAGE and LOCALE_ILANGUAGE are defined as "0c0c", while for fra.nls (fr_FR) LOCALE_IDEFAULTLANGUAGE and LOCALE_ILANGUAGE are defined as "040c".
Somebody else noticed this, or have an explanation?
Vincent
Le dim 13/07/2003 à 21:08, Vincent Béron a écrit :
I have problems displaying Wine's app in my locale (fr_CA). They seem to prefer to go to the English locale, although if launched with LANG=fr_FR wine notepad they will obey the French locale.
LANG=fr wine notepad will display a warning about the plurality of locales with "fr", but will display the app in French nonetheless.
I have a feeling it might be from dlls/kernels/nls/frc.nls, where both LOCALE_IDEFAULTLANGUAGE and LOCALE_ILANGUAGE are defined as "0c0c", while for fra.nls (fr_FR) LOCALE_IDEFAULTLANGUAGE and LOCALE_ILANGUAGE are defined as "040c".
Further testing shows it's not that (set LOCALE_IDEFAULTLANGUAGE to "040c" for fr_CA, but didn't change anything).
I'm a bit cluless now as to where to look...
Vincent
"Vincent Béron" vberon@mecano.gme.usherb.ca wrote:
I have problems displaying Wine's app in my locale (fr_CA). They seem to prefer to go to the English locale, although if launched with LANG=fr_FR wine notepad they will obey the French locale.
LANG=fr wine notepad will display a warning about the plurality of locales with "fr", but will display the app in French nonetheless.
LC_ALL=fr_CA wine notepad
should help. Probably you have no any of LC_ALL, LC_CTYPE, LANGUAGE, LC_MESSAGES, LANG environment variables set at all.
-- Dmitry.
Le dim 13/07/2003 à 23:52, Dmitry Timoshkov a écrit :
"Vincent Béron" vberon@mecano.gme.usherb.ca wrote:
I have problems displaying Wine's app in my locale (fr_CA). They seem to prefer to go to the English locale, although if launched with LANG=fr_FR wine notepad they will obey the French locale.
LANG=fr wine notepad will display a warning about the plurality of locales with "fr", but will display the app in French nonetheless.
LC_ALL=fr_CA wine notepad
Nope, doesn't work.
should help. Probably you have no any of LC_ALL, LC_CTYPE, LANGUAGE, LC_MESSAGES, LANG environment variables set at all.
LANG is normally set to fr_CA, and I have no problem getting other apps in French Canadian (Evolution, Gnome, etc.).
3 different runs: [vincent@beronski vincent]$ LC_ALL=fr notepad For language 'fr' several language ids were found: fr_FR - 040C; fr_BE - 080C; fr_CA - 0C0C; fr_CH - 100C; fr_LU - 140C; fr_MC - 180C; Instead of using first in the list, suggest to define your LANG environment variable like this: LANG=fr_FR (notepad displayed in French) [vincent@beronski vincent]$ LC_ALL=fr_FR notepad (notepad displayed in French) [vincent@beronski vincent]$ LC_ALL=fr_CA notepad (notepad displayed in English)
The same thing happens if I set LANG to de, de_DE and de_AT. The first two display notepad in Deutch, while the third displays it in English. pt, pt_BR and pt_PT (in that order) also show the same thing.
It seems some code (in dlls/kernel/locale.c?) has some problem selecting the proper locale if the country is not the first in the list showed if only the language is selected...
Vincent
"Vincent Béron" vberon@mecano.gme.usherb.ca wrote:
I have problems displaying Wine's app in my locale (fr_CA). They seem to prefer to go to the English locale, although if launched with LANG=fr_FR wine notepad they will obey the French locale.
LANG=fr wine notepad will display a warning about the plurality of locales with "fr", but will display the app in French nonetheless.
LC_ALL=fr_CA wine notepad
Nope, doesn't work.
That's because there is no resources marked as (LANG_FRENCH,SUBLANG_FRENCH_CANADIAN) in the Wine apps. If you fairly confident that all flavours of French (including Canadian) have too little differences and creating separate resources for each of them isn't worth the effort, then a way to go is to mark all french resources in Wine with (LANG_FRENCH,SUBLANG_NEUTRAL).
-- Dmitry.
Dmitry Timoshkov wrote:
"Vincent Béron" vberon@mecano.gme.usherb.ca wrote:
I have problems displaying Wine's app in my locale (fr_CA). They seem to prefer to go to the English locale, although if launched with LANG=fr_FR wine notepad they will obey the French locale.
LANG=fr wine notepad will display a warning about the plurality of locales with "fr", but will display the app in French nonetheless.
LC_ALL=fr_CA wine notepad
Nope, doesn't work.
That's because there is no resources marked as (LANG_FRENCH,SUBLANG_FRENCH_CANADIAN) in the Wine apps. If you fairly confident that all flavours of French (including Canadian) have too little differences and creating separate resources for each of them isn't worth the effort, then a way to go is to mark all french resources in Wine with (LANG_FRENCH,SUBLANG_NEUTRAL).
No, that doesn't sound correct to me. Did you check that this is the way Windows does it's matching?
As far as I remember, if an exact match does not exist, we should look for the same language with sublang DEFAULT. IIRC, there is no situation where defining "SUBLANG_NEUTRAL" is the correct thing to do in resources.
Shachar
"Shachar Shemesh" wine-devel@shemesh.biz wrote:
That's because there is no resources marked as (LANG_FRENCH,SUBLANG_FRENCH_CANADIAN) in the Wine apps. If you fairly confident that all flavours of French (including Canadian) have too little differences and creating separate resources for each of them isn't worth the effort, then a way to go is to mark all french resources in Wine with (LANG_FRENCH,SUBLANG_NEUTRAL).
No, that doesn't sound correct to me. Did you check that this is the way Windows does it's matching?
Yes I did. I think Alexandre did as well when he implemented ntdll resource APIs and made some fixes to the existing (at that time) search order.
As far as I remember, if an exact match does not exist, we should look for the same language with sublang DEFAULT.
No, Windows looks for the same language with neutral sublanguage in the case of specified language resource was not found. Win2k does one step more in the case of missing language resource: it looks for (LANG_ENGLISH, SUBLANG_NEUTRAL) after the failing (LANG_ENGLISH, SUBLANG_DEFAULT) case.
IIRC, there is no situation where defining "SUBLANG_NEUTRAL" is the correct thing to do in resources.
It's actually useful in the case described above.