
Editing local NLS for reports
JReport allows you to edit NLS for each report on the Administration page of JReport Server as the report designer would with the NLS Editor in JReport Designer. With the NLS Editor, you can translate a report into different languages from the original one. Note that this feature is provided to administrators only.
To edit NLS for a report on JReport Server:
- Start JReport Server and log onto the JReport Administration page.
- In the resource tree, browse to the report you want to edit.
- Select the row that the report is in, then click the NLS Editor button
in the Control column. The NLS Editor dialog appears. See the dialog.
- Specify a report and catalog version as required.
- Click the Add button
above the Language box.
- In the Add Language dialog, select the languages in which you want the report to display, then click OK to confirm and go back to the NLS Editor dialog.
- The selected languages are now listed in Language box of the NLS Editor dialog. Select a target language from the box to edit NLS for it.
- In the Display tab, click
, then in the Add Display dialog, where all the display text in the report are listed, add the display text you want to translate and click OK. Then, enter all the corresponding target language text in the Translate column. If you have defined global NLS for the target language, you can also click Fetch from Global NLS to fetch the corresponding display information. If required, click Add to Global NLS to add the display information you specify for the report to the global NLS library of the target language.
- Switch to the Format tab, click
, then in the Add Format dialog, where all the formats used in objects of the report are listed, add the formats you want to customize and click OK. Then, provide the corresponding format in the Format column for the target language.
- Click the Font tab, click
, then in the Add Font dialog, where all the fonts used in objects of the report are listed, add the fonts you want to customize and click OK. Then, give the font face and font size you want for the target language in the Font Face and Font Size columns. If you have defined global NLS for the target language, you can also click Fetch from Global NLS to fetch the corresponding font information. If required, click Add to Global NLS to add the font information you specify for the report to the global NLS library of the target language.
- Select another language and edit NLS for it as shown above.
- Click OK to accept the settings.
See also the NLS Editor dialog for detailed explanation about options in the dialog.
Notes:
- You can also edit NLS for a specific report version. To do this, on the JReport Administration page, access the version table of the report, then click the NLS Editor link for the report version.
- When you switch among different languages by choosing languages from the Language box, you may find that the text in the Translate column become unreadable. To resolve this problem, you can add
-Djreport.url.encoding=UTF-8
to the batch file that starts the server and then restart it. This changes the encoding to Unicode which supports all languages.
