diff options
author | xue <> | 2006-06-02 18:27:02 +0000 |
---|---|---|
committer | xue <> | 2006-06-02 18:27:02 +0000 |
commit | 0f3a577bed4d828472469675e90fcab032e33f44 (patch) | |
tree | 3ca817247b8006563900d5fb8995d6a6f0627a2b /demos/quickstart/protected/pages/Advanced/I18N.page | |
parent | 067ab51fbd9b2f18f63fc80895476e5b0e2f9bfb (diff) |
merge from 3.0 branch till 1133.
Diffstat (limited to 'demos/quickstart/protected/pages/Advanced/I18N.page')
-rw-r--r-- | demos/quickstart/protected/pages/Advanced/I18N.page | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/I18N.page b/demos/quickstart/protected/pages/Advanced/I18N.page index 5b1fafa0..6c86a6c9 100644 --- a/demos/quickstart/protected/pages/Advanced/I18N.page +++ b/demos/quickstart/protected/pages/Advanced/I18N.page @@ -148,9 +148,11 @@ To translate a message or string in the template, use <tt>TTranslate</tt>.</p> <com:TTranslate Text="Goodbye" />
</com:TTextHighlighter>
-<p><tt>TTranslate</tt> can also perform string substitution. Any attributes of <tt>TTranslate</tt> will be substituted with <tt>{attribute name}</tt> in the translation. E.g.</p>
+<p><tt>TTranslate</tt> can also perform string substitution.
+The <tt>Parameters</tt> property can be use to add name values pairs for substitution. Substrings in the translation enclosed with "{" and "}" are consider as the
+ parameter names during substitution lookup. The following example will substitute the substring "{time}" with the value of the parameter attribute "<tt>Parameters.time=<%= time() %></tt>".
<com:TTextHighlighter Language="prado" CssClass="source">
-<com:TTranslate time="late">
+<com:TTranslate Parameters.time=<%= time() %> >
The time is {time}.
</com:TTranslate>
</com:TTextHighlighter>
|