Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT Viewer is not changing localization of reports
shaman
BIRT Viewer 2.6.0, FF 3.6.3
Hello,
I am stuck on problem with localization of reports. Here is the problem:
I got some report design which have to be localized to different languages. I designed the report, set the resources with localization strings, set the keys for charts etc.
Then I copied the rptdesign to report viewer with resources as well. Report is placed in root of viewer, resources in ./resources.
I am calling the report with the __locale parameter set to different locale, than the default locale of the report (set at design time), but the labels are not changing. It seems, that the locale is set correctly, because format of the input date parameter changes. The localization files are in the right place and in right format, because the report default localization strings are loaded properly. It only refuses to load the new strings when I change the locale.
There is no exception in catalina.out or other logfiles.
Anyone can help me with this?
Find more posts tagged with
Comments
JasonW
Can you try jarring the resource files and putting them in WEB-INF/lib?
Jason
shaman
Hi Jason,
thanks for the reply. I tried to jar the localization files and put them to WEB-INF/lib, but no luck. It doesn't even load the default properties.
Any other idea? I will try some 2.5 version of report viewer today...
shaman
Uff, finally got it to work!
<br />
<br />
When I change this: <br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<simple-property-list name="includeResource">
<value>localization_en</value>
</simple-property-list>
</pre>
<br />
to this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<simple-property-list name="includeResource">
<value>localization</value>
</simple-property-list>
</pre>
it starts to work as expected. I do not understand why the locale from the design time is not stripped out when searching for properties, but it doesn't matter. Thanks for your time.
CBR
Hi shaman,
the default language property file doesn't needs to have a locale in it's filename. The way internationalization works is: Have a properties file without language code and define the translation for your default language inside this file. Then copy this file, translate it and put the appropriate language code in it's filename. The reason why you should always have a default properties file is that it acts as a fallback if the report is requested in you didn't translated your report to (or if a special key is not found in the appropriate language properties then the value of this key from the default properties file is beeing used).
So when you want to translate your report to english and german you can go this way:
Take one of them as default language and put the translation for this language inside the default properties file. Let's say you choose english as your default language, then just name the file localization.properties. Copy the file, translate it to german and save it as localization_de.properties