### Creating NLS property files

The NLS Editor is used to create and edit NLS property files for reports and library components. With the NLS Editor, you can translate the language, and modify the format, font size and font face of the target language.

You can create NLS property files for a report/library component by using the report and catalog NLS resources, or by using NLS resources that are created on JReport Server and can be used globally for all reports in JReport. For details about global NLS, see Creating global NLS for reports in the JReport Server User's Guide.

To create NLS property files for a report:

1. Open the report, then click Edit > NLS Editor on the menu bar or click the NLS Editor button on the NLS Language toolbar. The NLS Editor appears. See the editor.

2. Click above the Language box.
3. In the Add Language dialog, select the required languages in which you want the report to display, then click OK. The selected languages are now listed in the Language box of the NLS Editor.
4. When you open the NLS Editor for a report for the first time, by default, all the available report and catalog NLS resources are listed in the Display, Format and Font tabs of the NLS Editor. If you also want to use the global NLS resources created on JReport Server in the report, click Synchronize Global NLS with Server. The Connect to JReport Server dialog appears. See the dialog.

5. Type in the host and port of the remote JReport Server in the Host and Port text fields.
6. 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.
7. 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.
8. Check Remember connection information to enable JReport Designer to remember the connection information.
9. 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.
10. Click Connect. The global NLS resources defined for the selected languages are now displayed in the Display, Format and Font tabs together with the report and catalog NLS resources.
11. Select a target language from the Language box to edit NLS information for it.
12. In the Display tab, give the corresponding target language text for the keys in the Translate in <language> column. Use the quick search toolbar to locate the desired keys if needed.

    For any key, it may have three items with different scope: Global, Catalog and Report. If you want to use the global NLS definition for the key, leave its report and catalog scope items unchanged. If you edit the catalog scope item for the key, the definition can be used by all reports in the current catalog for the same language. To make the translation specific for the report, edit the report scope item.

    When you have edited some display text keys for certain language for a report, the next time you open the NLS Editor for the report to edit NLS for this language, only the edited keys are displayed by default.

    If some catalog scope display text keys are edited for a language, when you use the NLS Editor to edit NLS for another report in the same catalog for this language, by default only the edited catalog scope display text keys are listed for this language.

    To add more display text keys for a language, click above the key table, then in the Add Display dialog, specify the scope of the keys to be shown in the Available Display table, select the required keys and click OK.

    To remove any display text key, select it and click above the key table. You can select multiple keys and remove them at a time.

13. In the Format tab, provide the corresponding formats for the keys in the Format in <language> column for the target language. Use the quick search toolbar to locate the desired keys if needed.

    For any key, it may have three items with different scope: Global, Catalog and Report. If you want to use the global NLS definition for the key, leave its report and catalog scope items unchanged. If you edit the catalog scope item for the key, the definition can be used by all reports in the current catalog for the same language. To make the format specific for the report, edit the report scope item.

    When you have edited some format keys for certain language for a report, the next time you open the NLS Editor for the report to edit NLS for this language, only the edited keys are displayed by default.

    If some catalog scope format keys are edited for a language, when you use the NLS Editor to edit NLS for another report in the same catalog for this language, by default only the edited catalog scope format keys are listed for this language.

    To add more format keys for a language, click above the key table, then in the Add Format dialog, specify the scope of the keys to be shown in the Available Format table, select the required keys and click OK.

    To remove any format key, select it and click above the key table. You can select multiple keys and remove them at a time.

    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.

14. In the Font tab, give the font face and font size for the keys in the Font Face and Font Size columns for the target language. Use the quick search toolbar to locate the desired keys if needed.

    For any key, it may have three items with different scope: Global, Catalog and Report. If you want to use the global NLS definition for the key, leave its report and catalog scope items unchanged. If you edit the catalog scope item for the key, the definition can be used by all reports in the current catalog for the same language. To make the font properties specific for the report, edit the report scope item.

    When you have edited some font keys for certain language for a report, the next time you open the NLS Editor for the report to edit NLS for this language, only the edited keys are displayed by default.

    If some catalog scope font keys are edited for a language, when you use the NLS Editor to edit NLS for another report in the same catalog for this language, by default only the edited catalog scope font keys are listed for this language.

    To add more font keys for a language, click above the key table, then in the Add Font dialog, specify the scope of the keys to be shown in the Available Format table, select the required keys and click OK.

    To remove any format key, select it and click above the key table. You can select multiple keys and remove them at a time.

15. Select another language and edit NLS for it as shown above.
16. When done, click OK to close the dialog.

Notes:

- For the same key, its NLS definition can be specified at three level: global, catalog and report. Among them, the first has the lowest priority, and the third has the highest. Global NLS resources cannot be edited in JReport Designer.
- When the same key exists both in catalog NLS resources and report NLS resources and the translations at both levels are also the same, the one from report NLS resources will be automatically deleted after clicking OK in the NLS Editor.
- 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.