Go Back   Forum - BIRT Exchange > Deploying Reports Forums > Deploying and Integrating BIRT Report Engine in Applications

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-30-2009, 06:08 AM
Junior Member
 
Join Date: Jun 2009
Posts: 1
Default Birt Viewer only uses JVM default locale

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?
Reply With Quote
  #2 (permalink)  
Old 07-29-2009, 04:34 PM
Super Moderator
 
Join Date: Jul 2007
Posts: 805
Send a message via Yahoo to vdodson
Default

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 Report viewer internalization
__________________
~Virgil
http://twitter.com/birtexchange
Reply With Quote
Reply


Thread Tools
Display Modes




All times are GMT -7. The time now is 07:46 AM.
Powered by vBulletin Copyright © 2000-2010 Jelsoft Enterprises Limited.


Content Relevant URLs by vBSEO 3.1.0