NLS Editor
The NLS Editor is used to create and edit NLS property files for reports. With the NLS Editor, you can translate the language, and modify the format, font size and font face of the target language.
To display the NLS Editor, do either of the following:
- On the Edit menu, click NLS Editor.
- Click the NLS Editor button on the NLS Language toolbar.
The NLS Editor will then be displayed. See the editor.
Creating NLS property files
You can create NLS property files for a report either by using the report level resources (local NLS resources), or by using NLS resources that are created on JReport Server and can be used globally for all reports in JReport (global NLS resources), or by using a combination of these two. For details about global NLS, see Creating global NLS for reports in the JReport Server User's Guide.
To create NLS property files using global NLS resources:
- In the NLS Editor, check the Use Global NLS radio button.
- Click the Add button above the Language box.
- In the Add Language dialog, select the required languages in which you want the report to display, then click OK. The Connect to JReport Server dialog is then displayed. See the dialog.
- Type in the host and port of the remote JReport Server in the Host and Port text fields.
- When using a standalone server, enter /jrserver in the Servlet Path text field or the context root of your web application if deployed as a war or ear fie such as /jreport/jrserver.
- If the server has been integrated with another web server that supports SSL, select the SSL (Security Socket Layer) checkbox to create an SSL connection.
- Check Remember connection information to enable JReport Designer to remember the connection information.
- Provide the user name and password of the server. When the organization feature is enabled and when the user is an organization user, User Name should include the organization name. Use \ to separate the organization name and the user name, for example, org1\user1.
- Click Connect. The global NLS resources defined for the selected languages are now displayed in the Display and Font tabs.
- If the global NLS resources have been updated on JReport Server, click Synchronize with Server to download the latest resources from the server.
- When done, click OK to close the dialog.
To create NLS property files using local NLS resources:
- In the NLS Editor, check the Use Local NLS radio button.
- Click the Add button above the Language box.
- In the Add Language dialog, select the required languages in which you want the report to display, then click OK to confirm and go back to the NLS Editor.
- The selected languages are now listed in the Language box of the NLS Editor. Select a target language from the box to edit NLS information for it.
- In the Display tab, the types of the objects in the report and and items need to be translated are listed in the Type and Key columns. Give all the corresponding target language text in the Translate in <language> column. If you have already downloaded the global NLS resources for the target language from JReport Server, you can also click Fetch from Global NLS to fetch the corresponding display information.
- In the Format tab, the formats used in objects of the report are listed in the Key column. Provide the corresponding format in the Format in <language> column for the target language.
Note: To edit the format of the special fields Page N of M or Global Page N of M, you should first edit its format too, for example, Page <N> of <M> or Global Page <N> of <M> in the Report Inspector, and then in the Format tab of the NLS Editor dialog, a new line Page <N> of <M> or Global Page <N> of <M> will be listed and you can translate Page, of, Global Page into the desired language. N and M must be formatted as <N> and <M> in order to avoid errors.
- In the Font tab, the font face and font size used in objects of the report are listed in the Key column. Give the font face and font size you want for the target language in the Font Face and Font Size columns. If you have already downloaded the global NLS resources for the target language from JReport Server, you can also click Fetch from Global NLS to fetch the corresponding font information.
- Select another language and edit NLS for it as shown above.
- When done, click OK to close the dialog.
Note: When you have added some languages to the NLS Editor, a set of NLS property files will be generated in the directory where the current catalog exists according to the languages you have selected. One file is for one language with the name ReportName_language_locale.properties. The abbreviations of the language and locale are used in the NLS property file name. For example, the German NLS property file name for Report1 will be like this: Report1_de_DE.properties. For detailed information about the abbreviation for each language and locale, see Appendix 3: Language and Region name list for National Language Support.