[Resend PATCH] kernel32: Handle zh-Hant and zh-Hans in LocaleNameToLCID.

Alexandre Julliard julliard at winehq.org
Fri Nov 10 06:36:42 CST 2017


Eric Zhang <yi.gd.cn at gmail.com> writes:

> OK, I'll split LOCALE_SPARENT into a different patch.

Thanks.

> I tried extending get_default_sublang(). But it didn't work well.
> get_default_sublang depends on a LCID as parameter. However,
> currently there is no way to know the LCID of zh-Hant is 0x7c04.
> We need another internal map to do that. Maybe missing a .nls file?
> But in Windows it seems there isn't separate .nls for zh-Hant or zh-Hans.
> Getting all locale info from zh-Hant just returns the same info from zh-HK.

You can duplicate the zh-HK locale file for 0x7c04, yes.

> Even so, zh-Hant(0x7c04) and zh-Hans(0x0004) have the same primary langid
> but different sublang.I think getting different sublang from get_default_sublang() 
> sort of defeat its "get default" purpose.That's why I wrote a separate function that
> takes in LOCALE_SPARENT to do that.

Basically get_default_sublang is used when the country is not specified,
which is the case here. I think it would be quite natural to extend it
to the case where you have a script but no country.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list