BIRT Exchange Forum: Birt Viewer only uses JVM default locale - BIRT Exchange Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Birt Viewer only uses JVM default locale Rate Topic: -----

#1 User is offline   mtrowe 

  • Junior Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 29-June 09

Posted 30 June 2009 - 04:08 AM

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?
0

#2 User is offline   vdodson 

  • Administrator
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 856
  • Joined: 16-July 07

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
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users