Creating source string files

A source string file contains localized string definitions for a given language (or localization context).

What is a source string file?

A source string file is basically a mapping table that defines an identifier for each string.

After compiling source string files, the programs can load and use a string found according to its identifier (or key).

By convention, the source files of localized strings have the .str extension.

Syntax

Define a list of string identifiers, and the corresponding text, by using the following syntax:
"string-identifier" = "string-text"
For example:
"common.button.cancel" = "Cancel"
Note: Localized string keys are case sensitive. Consider using lower case characters only to avoid mistakes.
As an alternative, you can define string identifiers as a dot-separated list of identifiers:
identifier. [...] = "string-text"
For example:
common.button.cancel = "Cancel"
If needed, you can add comment lines with the # or -- markers, like in other Genero source files:
# a comment
-- another comment

Special characters

The fglmkstr compiler accepts the backslash "\" as the escape character, to define non-printable characters:

\l   \n   \r   \t   \\

Example

# A comment line
"Original text" = "Original text"
"forms.customer.list" = "Customer List"
"special.characters.backslash" = "\\"
"special.characters.newline" = "\n"