... basically like we already do for locale.
Hello all. So for my first contribution to Wine I've been wanting to tackle this issue, reported and suggested in bug #46196. I'd like to hear everyone's opinions on it and also have one question answered.
The bug: https://bugs.winehq.org/show_bug.cgi?id=46196
The mechanism is fairly simple, just asking Wine for the country code of the current locale and calling the appopriate Win32 functions to set that.
My main question is how to allow a user to disable this mechanism easily (say, with a registry key or with winecfg). Plenty of countries are simply not represented by either Linux or Wine locales, chiefly former colonies in Africa and Asia with European official languages. Think Angola, Mozambique, Macao, Morocco, etc.
Or if anyone has any better suggestion, this is the thread to send them in.
-- João Ferreira
João Diogo Ferreira devilj@outlook.pt wrote:
... basically like we already do for locale.
Hello all. So for my first contribution to Wine I've been wanting to tackle this issue, reported and suggested in bug #46196. I'd like to hear everyone's opinions on it and also have one question answered.
How about returning something like GetLocaleInfo(GetUserDefaultLCID(), LOCALE_ICOUNTRY|LOCALE_RETURN_NUMBER)?
How about returning something like GetLocaleInfo(GetUserDefaultLCID(), LOCALE_ICOUNTRY|LOCALE_RETURN_NUMBER)?
LOCALE_ICOUNTRY is the phone prefix, but your idea is sound. I tried LOCALE_IGEOID too but couldn't figure out how to implement in Wine. (Hint: simply adding those to the .nls files was not enough.)
What I found works is asking for the country code (LOCALE_SISO3166CTRYNAME) (what a mouthful) and matching it to the GeoID (easy).
Working with letter codes is actually better, too, because Microsoft is moving away from GeoIDs and into "geonames" (two-letter codes, like Linux and Android) and we can just do the matching in the new procs that support geonames. In fact, that's exactly what Microsoft is doing! Useful behavior to replicate.
Now, what I really, really need to know is how to let anybody opt-out, because not every country has a locale in Linux (or Wine, for that matter) x.x
(sorry for sending you this message before without CC'ing the mailing list, and for having to send it again) ________________________________ De: Dmitry Timoshkov dmitry.timoshkov@gmail.com em nome de Dmitry Timoshkov dmitry@baikal.ru Enviado: 14 de outubro de 2019 05:51 Para: João Diogo Ferreira devilj@outlook.pt Cc: wine-devel@winehq.org wine-devel@winehq.org Assunto: Re: [RFC] Automatically set GeoID on process startup
João Diogo Ferreira devilj@outlook.pt wrote:
... basically like we already do for locale.
Hello all. So for my first contribution to Wine I've been wanting to tackle this issue, reported and suggested in bug #46196. I'd like to hear everyone's opinions on it and also have one question answered.
The bug: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.wineh...
How about returning something like GetLocaleInfo(GetUserDefaultLCID(), LOCALE_ICOUNTRY|LOCALE_RETURN_NUMBER)?
-- Dmitry.
João Diogo Ferreira devilj@outlook.pt wrote:
How about returning something like GetLocaleInfo(GetUserDefaultLCID(), LOCALE_ICOUNTRY|LOCALE_RETURN_NUMBER)?
LOCALE_ICOUNTRY is the phone prefix, but your idea is sound. I tried LOCALE_IGEOID too but couldn't figure out how to implement in Wine. (Hint: simply adding those to the .nls files was not enough.)
Using LOCALE_IGEOID looks appropriate, it would be nice to follow this route.
What I found works is asking for the country code (LOCALE_SISO3166CTRYNAME) (what a mouthful) and matching it to the GeoID (easy).
Working with letter codes is actually better, too, because Microsoft is moving away from GeoIDs and into "geonames" (two-letter codes, like Linux and Android) and we can just do the matching in the new procs that support geonames. In fact, that's exactly what Microsoft is doing! Useful behavior to replicate.
Now, what I really, really need to know is how to let anybody opt-out, because not every country has a locale in Linux (or Wine, for that matter) x.x
Just don't worry about it for the initial implementation until that becomes a real problem (which is unlikely, since the missing locale support in the host OS would be the first thing to take care about).