This component performs message/string translation. The translation
source is set in the TGlobalization handler. The following example
demonstrated a simple message translation.
Gets or sets the string to translate. - Catalogue, string,
Gets or sets the catalogue for message translation. The default catalogue can be set by the @Page directive. - Key, string,
Gets or sets the key used to message look up. - Trim, boolean,
Gets or sets an option to trim the contents. Default is to trim the contents.
Depending on the culture set on the page, the phrase "Goodbye" will
be translated.
The {@link getParameters Parameters} property can be use to add name values pairs for
substitution. Substrings enclosed with "{" and "}" in the translation message are consider as the
parameter names during substitution lookup. The following example will substitute the substring
"{time}" with the value of the parameter attribute "Parameters.time=<%= time() %>. Note that
the value of the parameter named "time" is evaluated.
>
The unix-time is "{time}".
More complex string substitution can be applied using the
TTranslateParameter component.
Namespace: System.I18N
Properties
- Text, string,
Gets or sets the string to translate. - Catalogue, string,
Gets or sets the catalogue for message translation. The default catalogue can be set by the @Page directive. - Key, string,
Gets or sets the key used to message look up. - Trim, boolean,
Gets or sets an option to trim the contents. Default is to trim the contents.