Jump to content
We've recently updated our Privacy Statement, available here ×

How to change the default english Language of the Jasper report server


deepinder.singh

Recommended Posts

Hello Team,

We want to change the default language of the Jasper report server to Norwegian language.

Can someone help us how we can achieve that?

We know that we have option for the localization while logging into the jasper report server console, but we are actually bypassing the Jasper server login, with another login, so we are not getting option for the change of localization.

so would be nice if someone can help us with this requirement.

1. Change the report localization to Norwegian.

2. How to change the default english language to Norwegian of jasper report server, so that even if we are not using the jasper login and using some other mechanism, it should always show in Norwegian.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

There are two issues here:

  1. Create and enable Norwegian locale
  2. Display Norwegian locale.

The second one is actually the easy one here: "By default, JasperReports Server appears in the locale selected in the end user’s browser."  So if users have their browser set to Norwegian and Norwegian exists, then Norwegian is displayed.

The first one is harder. Now which do you want to do:

  1. Display report headers in Norwegian
  2. Display entire JRS interface in Norwegian.

For 2,  Norwegian is not supported out of the box.  So basically, you need to translate all strings in the JRS interface yourself:

https://community.jaspersoft.com/documentation/tibco-jasperreports-server-administrator-guide/v60/creating-locale

For 1, you can create a bundle for the report labels  in Studio and attach it to the report. There's some old iReport stuff here:

https://community.jaspersoft.com/wiki/tibco-jasperreports-server-and-ireport-designer-internationalization

The concepts are the same, how you get there in studio is different. . In studio things are located as follows:

To create a resource bundle:

  1. Go to File > New > Other... to open the New dialog.
  2. Select Messages Editor > ResourceBundle and click Next
  3. Make all your choices and click Finish

Then you see a Resource Bundle editor. This can be a little buggy, but you should be able to create keys and  add values.

Then you have to create references from your report to the keys using the $R{} syntax. 

 

Link to comment
Share on other sites

It's possible to specify language in the url used to access JasperReports Server. Check the following page.

https://community.jaspersoft.com/wiki/how-specify-jasperreports-server-locale-url

Following pages in JasperReports Server documentation contains information on resource bundle.

https://community.jaspersoft.com/documentation/jasperreports-server-user-guide/locale-bundles

Information on creating resource bundle for reports.

http://jasperreports.sourceforge.net/sample.reference/i18n/index.html

Unfortunately, there is no explicit chapter on Resource Bundle in Jaspersoft Studio documentation but can get some information by searching for "Resource Bundle".

https://community.jaspersoft.com/system/files/restricted-docs/jaspersoft-studio-user-guide_7.pdf

Link to comment
Share on other sites

Thanks for the response, Elizam and Hozawa.

It seems like we can use the option to use the language in the URL (then it is selecting the same language which we get while logging into jasper console and select the localization).

example below:

https://iam-windows:8443/jasperserver-pro/login.html?userLocale=en_NO[/code]

But if I select this, it is not changing the language to Norwegian, I guess for that I need to first get the list of bundles which we first need to convert it into Norwegian, and I guess those are placed at this location: E:EIAMTomcat8.5webappsjasperserver-proWEB-INFbundles (do I need to convert all the property files placed at this location). Please confirm if this understanding of mine is correct.? Or if there is any other steps which I need to perform before using the locale in the URL as mentioned above.

This changing of all the bundles' property files into a new language is going to take time.

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...