Hi guys.. small work out but very use full..
Generally customers want to see data in their own language.
This example is developed using iReport 5.1.0 pro, Jasper server pro and foodmart db with postgresql.
Example : Converting English to Spanish
1) From Jasper Community
2) From google translator
1) File->New ->Save report to your fav directory.
2) Write a simple query and drag a field to title band( Not necessary to do but iReport requires some query and field otherwise it’ll show empty report).
3)Take Text field(Not static text) and write the following.
NOTE: $R is the special syntax used for internationalization of text in iReport.
4) Right click on report Name -> Select properties -> Give Resource bundle Name
This is resource bundle name , do not give extension for this.
5) Publish your report to Jasper Server and in resources section add the bundle files.
You need to add two files..
One file contains general English text(USA) another consists internationalized text
In this example second file having spanish(B’z you are converting English to spanish)
Right click on Resources -> Add -> Resource Bundle id ,Name and browse for the files
You must add two files.
In this example:
File 1 ID & Name : localizationdemo.properties (You can give any of your name , extension is not mandatory). Write this text in file
File2 ID & Name : localizationdemo_es.properties and add the file from your local machine. Write this text in file
In jasper server Change locale to es-Spanish