On 2005/04/20, at 9:30, Patrick Luby wrote:
http://porting.openoffice.org/servlets/ReadMsg?list=dev&msgId=1467012
The code seemed good to me so Neo/J users have been using it for several months with no bugs reported.
Nice to hear that there is no bug report about the code.
I have one question. What will be the content of the 'locale' variable in the code if I add ja.lproj? I need the string "ja_JP.UTF-8" to enable XIM (Xinput method) to work. If the content of the 'locale' is just "ja", we can't input Japanese characters in X11 version of OOo.
This code iterates through the list of preferred languages that the user has set in the System Preferences application and it will return the first locale for which there is a matching <locale>.lproj directory. If no locale matches, it will return the first locale where the language code matches a <locale>.proj directory.
For example, if my app has the following two directories and I set my preferred language to U.S. English, "en_US" will be returned:
en_US.lproj en.lproj
If I delete the en_US.lproj and run the same test, "en" will be returned.
I see. Thanks for your explanation.
What this means for OOo X11 is that you will still need to append a country code and ".UTF8" where required for the X11 window input methods. The benefit of my donated code is to at least the language will accurately reflect what the user has selected in the System Preferences application.
I was also thinking that the approach of determining locale in osxlocale.c (in OOo 1.1.3) using "Region:" in International System Preference was confusing. So your code is much appreciated. Maybe I'll add issue about X11 specific problem after your code is merged in OOo 2.0.
Cheers, -- Etsushi Kato [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
