Modifying the output / Using localized strings |
The Localized Strings feature allows:
This feature can be used to implement internationalization in your application, or to use site-specific text (for example, when business terms change based on territory).
You could have multiple external string files, each containing the translated string in a different language. The DVM (runtime system) searches the files in order to assign text in the report definition. The localized text replaces the captions and other specified text at runtime, choosing the correct string file based on entries in the file fglprofile.
A text file, with a str extension, defines the string to be displayed for the report object captions or the specified Word Box or WordWrap Box text You can check the Text property of the report object to determine the exact string to be replaced.
"identifier" = "string
where:
The backslash "\" is accepted as the escape character, to define non-printable characters.
"Userid" = "Client ID" "Shipcity" = "City"
At runtime, the text 'Userid" or "Shipcity" would be displayed in the report as "Client ID" and "City".
This source string file should be added to the Genero Studio Project Manager application node for your report program, so it can be compiled when the application is built. The compiled file (42s) is not linked into the Genero executable.
"hello "+"world".translate()
"world" = "universe"
then the final text displayed on your WordBox will be “hello universe”.
fglrun.localization.warnKeyNotFound= false -- don't display warnings on errors fglrun.localization.file.count = 1 -- number of string files fglrun.localization.file.1.name = "captions_en.42s" -- name of the string file
See the FGLPROFILE topics in the Genero Business Development Language User Guide for complete information about the fglprofile file.
See the Localized Strings topics in the Genero Business Development Language User Guide for complete information and examples.