Configuring JasperReports Server to Offer a Locale

After creating a locale, you must configure JasperReports Server to offer it to your users, along with any new time zones.

The tasks in this section require you to edit these files:

File Name


Purpose of Edits



Specifying additional locales



Specifying additional time zones

Specifying Additional Locales

By default, JasperReports Server appears in the locale selected in the end user's browser. The Login page allows users to specify the locale they want to use. The list of available locales is defined in applicationContext-security.xml. Edit this file to add a new locale.

To add a new locale:

1. Edit the applicationContext-security.xml file and locate the bean named userLocalesList. For example:
<bean id="userLocalesList"
    <property name="locales">
            <value type="java.util.Locale">en</value>
            <value type="java.util.Locale">fr</value>
            <value type="java.util.Locale">it</value>
            <value type="java.util.Locale">de</value>
            <value type="java.util.Locale">ro</value>
            <value type="java.util.Locale">ja</value>
            <value type="java.util.Locale">zh_TW</value>
2. Add the new locale to the end of the list. For example, add the following line for Dutch (Java's nl_NL locale):
            <value type="java.util.Locale">nl_NL/value>
3. Save the file.
4. Restart JasperReports Server, and log into the web application to test your translation. Reviewing the translated strings in context can help you improve your word choices.

For a list of Java-compliant locales, please refer to the Java documentation.

Specifying Additional Time Zones

By default, JasperReports Server assumes the user's time zone is that of the JasperReports Server host. The Login page allows users to choose a different time zone. The available list is defined in applicationContext.xml file.

To add a time zone:

1. Open the applicationContext.xml file and locate the userTimeZonesList bean. For example:
<bean id="userTimeZonesList"
    <property name="timeZonesIds">
2. Add the new time zone to the bottom of the list. Specify each time zone as the standard Java time zone values so that JasperReports Server adjusts for daylight savings time when appropriate. For example, add the following line for Tokyo:
3. Save the file.
4. Restart JasperReports Server.

For more information about Java-complaint time zones, please refer to the Java documentation.

Setting a Default Time Zone

If you want JasperReports Server to use a time zone other than the host computer's, you can set a specific time zone in Java. It becomes the default time zone for all users, but they can still select a different time zone when they log in.

To set a default time zone, set the user.timezone property in the JVM as shown in the tables below. Locate the file containing JVM settings for your platform and application server. The value for the property must be a Java-compliant time zone, for example, Europe/Bucharest.

You must restart your application server for this setting to take effect. The time zone is set for all applications in your application server, including JasperReports Server.

JVM Settings for Default Time Zone

Operating System

App Server






Add this line of code:







Add this line of code:







Add this line of code to the <jvm-options> section: