[NTDLL] Consider SUBLANG_DEFAULT after SUBLANG_NEUTRAL when loading resources

Alex Villaci­s Lasso a_villacis at palosanto.com
Tue Feb 15 15:15:33 CST 2005

Can you believe that, until quite recently, I believed that there was no 
i18n support in Wine???

Actually, there was a bug in resource loading, which caused Wine to fail 
to load the apropriate resources for my locale (es_EC). As far as I can 
tell, the resource loader tries several combinations for the resource 
LCIDs, and then defaults to English. In my case, the LANGID was supposed 
to be 0x300a (Spanish, Ecuador), and the resources in regedit listed a 
resource for LANGID 0x040a (Spanish, DEFAULT language). The loader tried 
0x300a (Spanish, Ecuador), and then 0x000a (Spanish, NEUTRAL). However, 
since DEFAULT != NEUTRAL, the Spanish resources failed to be loaded for 
my setup, and defaulted to English.

This patch adds code to try SUBLANG_DEFAULT after SUBLANG_NEUTRAL when 
loading resources. This fixes the resource loading for my setup.

* Try SUBLANG_DEFAULT after SUBLANG_NEUTRAL when loading localized resources

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-ntdll-resource-find_entry-SUBLANG_DEFAULT.patch
Type: text/x-patch
Size: 1548 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050215/2a9eded6/wine-ntdll-resource-find_entry-SUBLANG_DEFAULT.bin

More information about the wine-patches mailing list