This component performs message/string translation. The translation
source is set in the TGlobalization handler. The following example
demonstrated a simple message translation.
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.
More complex string substitution can be applied using the
TTranslateParameter component.
Namespace: System.I18N
Properties
-
Gets or sets the catalogue for message translation. The
default catalogue can be set by the @Page directive.
-
Gets or sets an option to trim the contents.
Default is to trim the contents.
Sets the text for localization.
translateText()
protected méthode
Translates the text with subsititution.