Reputation: 16248
I am running an english language version of WindowsXP, but have set Spanish as my only accepted language in Firefox. I had naively expected the browser's language to be set as the default when I load an applet in a browser session, but this does not appear to be the case. The applet starts up in English, the default language of the OS.
I could add a new <param> to my Applet and call Locale.setDefault() during initialization, but before I start hacking away I'd like to know if I'm missing something obvious. Is there a common mechanism by which the browser or invoking web page can set the default language of an <applet> ?
Upvotes: 0
Views: 4069
Reputation: 1
Previously, the default locale for applets and for Java-applications was derived from the locale of Windows. With jre 7 this is still true for Java-applications, but it is no longer true for applets. The default locale for applets is en_US no matter how you set the Windows locale. This must truely be a bug related to the Java plugin. /Aron
Upvotes: 0
Reputation: 35372
The java plugin uses the OS locale not the browser one.
To override the default locale, go in the java control panel - java tab, Press the View button of the Applet Runtime Settings, and add the required parameter in the 4th column, it is editable even if it's grayed.
In your case, try something like -Duser.language=es
Bye.
Upvotes: 2