Recently In a Project I used Jasper to generate PDF forms.While doing this task I encountered a problem with Localization of Jasper Fields from Property Files.
Normally we include below attribute in JRXML header to point to localization files.
Localization files will be in same folder where JRXML is placed and localization files will be in below format.
- jasperreports_en.properties
- jasperreports_th.properties
- etc
And each file will have key value pair like
delivery.date=Delivery Date
delivery.print.date=Print Date
and it will be used in JRXML in below format
and Localization is passed to JRXML in below format
parameterMap.put(JRParameter.REPORT_LOCALE, new Locale("th"));
When I generated the PDF for Thai language the output was a bunch of junk values.