Dmitry Timoshkov wrote:
As far as I understand what you are trying to do and what the patch Alexandre committed does is to make the user interface use english while you still have an ability to type in your native language.
No. What I'm trying to do is have none-unicode applications use the correct codepage according to their LC_CTYPE. That's all I'm trying to do. While my original patch tried to also choose the interface language, I removed that part. I think you are simply reading into this patch's intentions things that are not there.
That's not how Windows does this, at least to my understanding.
That is precisely how windows does it.
On my english win2k with locale set to russian both GetSystemDefaultLCID and GetUserDefaultLCID return 0419 (russian).
Now I'm not following what you are trying to say. According to my understanding of Windows, if you installed an English Win2k and set system locale to Russian, all non-unicode applications you run will interpret the string of bytes they read from files etc. under a Russian codepage. If you set the user locale to Russian as well, you will get dates in European order etc. as well. Your interface language should remain English. That is the behaviour you are seeing, right? In fact, the only way you would actually get Russian interface is if you installed a Russian Windows. If you then set your system locale to English, you would get question marks instead of letters from many non-unicode applications that use resources, as their resources would try to load Russian, which would not be supported by their codepage (system locale).
Your setup is equivalent to setting "LANG" to Russian, and LC_MESSAGES to en_US on Unix, or to setting LANG to en_US and then setting LC_CTYPE, LC_CDATE etc. to Russian. Either one should do the trick on Unix, and so either one should do the trick on Wine.
I don't know how MUI enabled Windows versions implement that functionality, but I don't think that it's just the system locale.
It's not. I've installed MUI, and am currently investigating this. I'm thinking of either having "FindResource" use the interface language as defined by MUI instead of "LANG_NEUTRAL, SUBLANG_NEUTRAL", or replace entry 9 in "find_entry" with the above mentioned language. I still have to see how that is defined on Windows MUI. In any case, I trust there is no argument that Wine should behave like MUI, right?
Either way, the patch above (second version) had no presumptions to do what you claim it tries to do, and I therefor think your objection to it is unfounded.
Shachar