Localizing Page Navigation Links in HTML Report Outputs
Before exporting a report to HTML, you can localize the names of the page navigation links in the report, such as First, Previous, Next, and Last. This topic describes how you can localize the page navigation link names to display them in your preferred language in the HTML outputs.
- Create the sub directories in
<designer_install_root>\resources\report\languages\[language-locale]\properties. For example,
C:\(Undefined variable: Logi_Variables.LogiReport)\Designer\resources\report\languages\zh-cn\properties.
The language argument is a valid ISO Language Code as defined by ISO-639. You can find a full list of these codes at a number of sites, for example: http://www.loc.gov/standards/iso639-2/php/code_list.php. The locale argument is a valid ISO Country Code as defined by ISO-3166. You can find a full list of these codes at a number of sites, for example: http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html.
- Create a report.properties file in the "properties" directory.
- Open the property file and copy the following contents to it:
# The following is the report properties file format that can localize the link names in HTML.
[email protected]; of @TotalPageNumber;
- Translate the text after "=" to the specified language.
For the line "[email protected]; of @TotalPageNumber;", you just need to translate "of" to the desired language. In the HTML output, Logi Report replaces "@CurrentPageNumber" by the current page number, and "@TotalPageNumber" by the report total page number.
- Save the property file with UTF-8 encoding.
- Copy the property file to the
- Convert the contents in the property file into Unicode using native2ascii.exe in
<jdk_install_root>\binby running the following command:
C:\jdk1.8.0\bin>native2ascii -encoding utf-8 report.properties > newreport.properties
When you convert a property file to the same directory as the original one, you need to give the file a new name instead of replacing the original in order to avoid problems.
- Delete report.properties in
<designer_install_root>\resources\report\languages\[language-locale]\propertiesand copy newreport.properties in
<jdk_install_root>\binto it, and then name the property file back to report.properties.
- Start Designer and open a multi-page report, select the language defined for the property file from the Language drop-down menu on the Home or View menu tab.
- Select File > Export > HTML to export the report to HTML (make sure you do not select No Hyperlink and No Page Number).
- Open the HTML output. The page navigation links display in the language you specify.