Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Birt Viewer only uses JVM default locale
mtrowe
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?
Find more posts tagged with
Comments
Virgil Dodson
Hi mtrowe,<br />
<br />
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. <br />
<br />
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 <a class='bbc_url' href='
http://www.birt-exchange.org/forum/31630-post2.html'>http://www.birt-exchange.org/forum/31630-post2.html</a>
;