Im using BIRT 2.3.1 running on apache-tomcat-5.5.26.
I can't get the BIRT Report Viewer to use another locale then the JVM default locale.
As far as I understand, BIRT checks for a locale in the following order:
1. the locale provided via the __locale request parameter,
2. the browser locale,
3. the locale provided in web.xml,
4. the JVM default locale.
But when I use BIRT, 1 through 3 are ignored, and the JVM default locale is always used.
When I debugged the Viewer, I saw that
org.eclipse.birt.report.model.i18n.Threadresources.setLocale(ULocale) is only called in
org.eclipse.birt.report.model.core.DesignSession.activate()
The locale used in the activate method is provided in the method org.eclipse.birt.report.engine.parser.ReportParser.getDesignHandle(String, InputStream) by a call to com.ibm.icu.util.ULocale.getDefault().
So this would explain why the default locale is always used, but it can't be the intended behavior.
What am I doing wrong?
Page 1 of 1
Birt Viewer only uses JVM default locale
#2
Posted 29 July 2009 - 02:34 PM
Hi mtrowe,
How are you checking if the locale is getting set correctly? You should be able to see the different date, and number decimal locations by default, but the BIRT report content won't change unless you have assigned some localization to the report, and then created and deployed the correct properties files for each language.
As for the built-in viewer labels, these are controlled in a file called messages.properties, that you can also modify.... or create one for each language you want to support. There is more information on this at http://www.birt-exch...1630-post2.html
How are you checking if the locale is getting set correctly? You should be able to see the different date, and number decimal locations by default, but the BIRT report content won't change unless you have assigned some localization to the report, and then created and deployed the correct properties files for each language.
As for the built-in viewer labels, these are controlled in a file called messages.properties, that you can also modify.... or create one for each language you want to support. There is more information on this at http://www.birt-exch...1630-post2.html
Page 1 of 1



MultiQuote
