Bug #33194 Changing the locale doesn't take effect at all.
Submitted: 13 Dec 2007 2:33 Modified: 11 Jul 2008 20:42
Reporter: Mikiya Okuno Email Updates:
Status: Closed Impact on me:
Category:MySQL Enterprise Monitor: Web Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Sloan Childers CPU Architecture:Any
Tags: beta, japanese, Merlin

[13 Dec 2007 2:33] Mikiya Okuno
After I set the locale to Japanese, changing it to English takes no effect. I can confirm the current setting is English, but the interface remains displayed in Japanese.

How to repeat:
- Start the merlin and access it with a web browser.
- Set the locale to Japanese, then you'll see the Japanese interface.
- Set the locale to English back, then you'll see the Japanese interface.
[13 Dec 2007 2:33] MySQL Verification Team
Local setting is English, but real language is Japanese.

Attachment: Picture 1.png (image/png, text), 64.35 KiB.

[18 Dec 2007 23:43] Joshua Ganderson
Currently unable to repeat - will need to investigate further.
[7 Jan 2008 20:07] Sloan Childers
Is this still reproduceable?  We were not able to break this.
[6 Mar 2008 14:18] Toru Sugihara
It is still same with 8957.
[6 Mar 2008 14:19] Toru Sugihara
This is a screenshot in Englsigh language setting.

Attachment: Dashboard in English language setting.png (image/png, text), 97.19 KiB.

[11 Mar 2008 18:11] Bill Weber
to reproduce the behavior - add "-Duser.country=JP -Duser.language=ja" to JAVA_OPTS in catalina.sh/bat

 <mikiya> realized that i use LANG=ja configuration by default
 <mikiya> LANG=ja_JP.UTF-8 in my .profile
[11 Mar 2008 21:08] Sloan Childers
This problem can surface when Java thinks the default locale is something other than the language in the default message bundle and the default locale has a proper resource bundle installed.  Not very clear yet, keep reading.

For example:  Say a user that launches the MEM server has their locale set to Japanese in their .profile but the MEM user is configured to use the English locale.  Our default message bundle happens to be in English and yes we also have a Japanese resource bundle - this is what surfaces the problem.  Part of the user interface uses Struts for getText and that part picks up the Japanese bundle.  Part of the user interface uses a different getText implementation and it picks up MEM users locale.  Confused yet?  If so ping me (sloan).  If not read on for some workarounds.

Solution #1:  Add a resources_en.properties file to the merlin.jar so nobody picks up the wrong default.  The default bundle is meant as a last resort.

Solution #2:  Ensure that the Java process that launches our Tomcat instance thinks the default locale is English reguardless of operating system or user preferences.

You can do this by adding "-Duser.country=US -Duser.language=en" to JAVA_OPTS in catalina.sh/bat

Solution #3:  Always launch the MEM server with a user that has their default locale set to English.

You can do this on many Linux flavors by adding LANG=en_US in the users .profile
[11 Mar 2008 21:14] Mark Matthews
For Solaris, one should set LANG to en_US.UTF-8 for the shell of the user who the service manager is running under.
[11 Mar 2008 21:17] Mark Matthews
For Mac OS/X, change the locale to English/US via the System Preferences -> International dialog.
[17 Jun 2008 15:16] Toru Sugihara
I tested about it. It still happens.
[9 Jul 2008 17:51] Sloan Childers
r9150 ga-1.3.2
[11 Jul 2008 1:29] Akiko Yonemura worked fine on my Japanese Linux. (LANG=ja_JP.UTF-8)

The language was successfully switched from English to Japanese after changing the "Locale" to Japanese. I could also see English after setting the "Locale" back to English.
[11 Jul 2008 15:55] Toru Sugihara
I also confirmed it is fixed with the same version on my Japanese Vista machine.
Thank you!
[11 Jul 2008 20:42] Bill Weber
closing based on comments from Toru and Akiko