Jump to content
Changes to the Jaspersoft community edition download ×

How can I set language to my report ?


mitttico

Recommended Posts

Hi!

I did a report with ireport and after i use it in my java application. It's all right.

Now I'd like use internationalization. How can I set to my report the language to use by my Java application?

 

Thanks a lot.

 

bye

Code:
JasperPrint jasperPrint = JasperFillManager.fillReport(reportFile, par, connection());
Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

All your text should be passed as parameters from your application to the ireports design file.

Example: if you're displaying text 'Demo text', create a parameter 'demo' to be displayed instead, and from your application pass parameters map with ('demo', 'Demo text')

Link to comment
Share on other sites

Thanks! But in my reports there are a lot of word to translate, I'd like to use the Internationalization! /tools/fckeditor/editor/images/smiley/msn/regular_smile.gif

I have my file_en_EN.properties and other for other language and when a user of my aplllication want to print a report he views the report in his language.

But how can I set the language from Java?

I try to pass Locale in parameter:

par.put("JRParameter.REPORT_LOCALE", locale);

but it daoesn't work

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...