How to change default locale in BIRT

Posted by zlajo on Stack Overflow See other posts from Stack Overflow or by zlajo
Published on 2010-04-22T07:21:41Z Indexed on 2010/04/22 7:23 UTC
Read the original article Hit count: 332

Filed under:
|
|

Hi everybody,

I am working with the BIRT reporting engine and my current task is to implement internationalization for reports. We are using the webviewer to generate and download pdf reports. There is a parameter (__locale) which allows me to specify the locale that should be used to generate a report. So far everything works fine.

There is an additional requirement I have not been able to implement, though. Additionally to the locale which is set by the http parameter there should also be the possibility to specify some kind of fallback locale.

Take the following example: There are two property-files common_en_US.properties and common_en_GB.properties. The first locale to be used should be en_GB (__locale=en_GB). Everything works fine if the common_en_GB.properties file exist. But I would also like to tell BIRT to use common_en_US.properties if the en_GB-file cannot be found, which does not work as expected.

I tried to solve this by manually setting the Java default locale before executing BIRT because I thought that BIRT would use the Java mechanism to resolve localized strings. Unfortunately this attempt does not work.

Is there a different way to do what I would like to do? Is it possible to do something like that at all?

Thanks a lot! Johannes

© Stack Overflow or respective owner

Related posts about birt

Related posts about locale