Localizing Report Recipes
For a report recipe to support localization, a report property file must be created for each supported language. Report recipes contain keys (tokens defined in the recipe file) and values (content). Report recipes are displayed to users based on their locale. If the client locale is not available, the default language is the server locale. If both the client locale and server locale are not available, then, the default language for the report recipe is English. If both the client locale and server locale are not available, and English is not available, the default is to fall back on tokens.
|
To support localized static reports, the following server property can be set with appropriate values: mksis.im.reportCreationLanguageList. For more information, consult the documentation for that server property.
|
Consider the following when creating report property files:
• Property files contain key-value pairs. The key represents the token, and the values represent the localized messages that replace the token.
• Property file keys must only contain alphanumeric characters without any white spaces between them. The recommended best practice for a key is to capitalized words and separate those words by underscores (_).
• When creating the property filenames, append each filename with RB_locale.properties, where locale is the language locale. The exception is the English locale, which is RB.properties. The following are examples of the property filenames the Basic - HTML, Column report recipe in some of the supported languages:
◦ English, Basic - HTML, ColumnRB.properties
◦ German, Basic - HTML, ColumnRB_de.properties
◦ Simplified Chinese, Basic - HTML, ColumnRB_zh_CN.properties
◦ Japanese, Basic - HTML, ColumnRB_ja.properties
◦ Korean, Basic - HTML, ColumnRB_ko.properties
◦ French, Basic - HTML, ColumnRB_fr.properties
• If there is no value for the token, the token name is displayed to users attempting to access the report recipe in that language.
For more information on using report property files with report recipes, see
Report Wizard Components and
To create a custom report recipe.
The following is an example of tokens in a report recipe:
<%version 1%>
<%description
<b>${DATA}$: </b>${ITEM_FIELDS}$<br>
<b>${NOTES}$: </b>${DESCRIPTION_NOTES}$<br>
%>
<%param
name="reporttitle"
type="String"
prompt="${REPORT_TITLE}$"
value=""
description="${REPORT_TITLE_DESCRIPTION}$"
%>
<%param
name="reportheader"
type="MultiString"
prompt="${REPORT_HEADER}$"
value=""
description="${REPORT_HEADER_DESCRIPTION}$"
%>
<%param
name="reportfooter"
type="MultiString"
prompt="${REPORT_FOOTER}$"
value=""
description="${REPORT_FOOTER_DESCRIPTION}$"
%>
The following is an example of the corresponding properties:
DATA=Data
ITEM_FIELDS=Item Fields
NOTES=Notes
DESCRIPTION_NOTES=This report displays a listing of items in column format.
REPORT_TITLE=Report Title
REPORT_TITLE_DESCRIPTION=Descriptive title for your report.
REPORT_HEADER=Report Header
REPORT_HEADER_DESCRIPTION=Text appearing at the top of the report page.
REPORT_FOOTER=Report Footer
REPORT_FOOTER_DESCRIPTION=Text appearing at the bottom of the report page.