How to localize reports
Posted on December 8, 2009 at 1:05am
Could someone tell me how can I localize my reports?
I would like to translate my column header etc. from english to other leangues.
Joined: Mar 9 2009 - 4:46am
Last seen: 5 years 10 months ago
Posted on December 8, 2009 at 1:33am
Joined: Oct 15 2008 - 7:09am
Last seen: 4 years 5 months ago
Posted on December 8, 2009 at 2:07am
Hi,
thanks.
I have created a new Resource Bundle in iReport as name: hu
After I have uploaded to Resources folder, near to the report.jrxml on the JAsperserver.
I have set at the report properties-> Resource Bundle parameter : hu
I have uploaded the modified jrxml as well.
In the detail header I have set the Text value: $R{Date}
In the hu.properties I have: Date=Datum, but it does not translate it it shows: $R{Date} as columnheader.
Post Edited by kuzman at 12/08/2009 10:16
Post Edited by kuzman at 12/08/2009 10:22
Post Edited by kuzman at 12/08/2009 10:42
Joined: Mar 9 2009 - 4:46am
Last seen: 5 years 10 months ago
Posted on December 8, 2009 at 3:27am
Hello
Have you add the ressource on the repository as well ?
(see step 4,5,6 from internationalize report)
Guillaume
Joined: Oct 15 2008 - 7:09am
Last seen: 4 years 5 months ago
Posted on December 8, 2009 at 3:33am
yes of course.
It is working with textField and not with static text.
When I make several leangue files, how can I select witch one will be used at current report? By report parameter or how?
Post Edited by kuzman at 12/08/2009 12:45
Joined: Mar 9 2009 - 4:46am
Last seen: 5 years 10 months ago
Posted on December 8, 2009 at 6:54am
This feature is not supported by static text as they do not understand expresion. You must use text fields
Guillaume
Post Edited by gautier at 12/08/2009 14:55
Joined: Oct 15 2008 - 7:09am
Last seen: 4 years 5 months ago
Posted on December 8, 2009 at 7:07am
When I make several leangue files, how can I select witch one will be used at current report? By report parameter or how?
Joined: Mar 9 2009 - 4:46am
Last seen: 5 years 10 months ago
Posted on December 8, 2009 at 7:09am
resource bundle names are similar used to java resource bundle name which is
{base name}_{language code}_{country code}.properties
the {base name} needs to be set within the report.
for each localization a matching bundle needs to exist.
here an example:
base name is set to messages.
for the default locale just deploy a file messages.properties. for language specific settings you need: for german language support a file messages_de_DE.properties would need to exist, for a french bundle you will need a file messages_fr_FR.properties.
the current report locale is defined by JasperServer, the locale the user has chosen while login.
Joined: Nov 10 2008 - 3:38am
Last seen: 2 years 6 months ago
Posted on December 8, 2009 at 7:43am
Oke I understand the file names.
Our application definine the language during the login there is a language selector. In that case the applicaiton should set the actual language. In that case with witch parameter could I force the JAsperserver to use the selected language file?
Post Edited by kuzman at 12/08/2009 15:46
Joined: Mar 9 2009 - 4:46am
Last seen: 5 years 10 months ago
Posted on December 8, 2009 at 8:31am
Hi,
You can use the REPORT_LOCALE parameter in your reports and sets it to the language you wish to use
Guillaume
Joined: Oct 15 2008 - 7:09am
Last seen: 4 years 5 months ago
Posted on December 8, 2009 at 8:33am
alternatively the parameter can be taken from the session
Joined: Nov 10 2008 - 3:38am
Last seen: 2 years 6 months ago
Posted on December 9, 2009 at 12:04am
I have put the hungarian to the application-security.xml..
Thanks.
Post Edited by kuzman at 12/09/2009 09:32
Joined: Mar 9 2009 - 4:46am
Last seen: 5 years 10 months ago
Posted on December 10, 2009 at 12:59am
Hi
The localization is working well.
Currently I have uploaded the resource bundles translation files under the report's resource.
Is it possible to copy them to one global space? All reports can use the same translation files and I do not need copy them under every report resource.
Joined: Mar 9 2009 - 4:46am
Last seen: 5 years 10 months ago
Posted on May 11, 2010 at 9:58am
Guillaume, I tried setting an input control in the repository for REPORT_LOCALE, and set its value to "fr_FR" (of which I have bundle for), but when the report is ran I still have "en_us" which is being read from my browser and the value does not get changed. Can you show an example of the code you use to assign the REPORT_LOCALE a new value, I would really like the users to be able to change their locale at Report Runtime, rather than at Login. Thanks.
Joined: Apr 16 2010 - 8:46am
Last seen: 9 years 8 months ago