summaryrefslogtreecommitdiff
path: root/demos/quickstart
diff options
context:
space:
mode:
authorwei <>2006-06-01 03:53:17 +0000
committerwei <>2006-06-01 03:53:17 +0000
commit6c51bde9db85fa63adbddf2240a521b437bbb06a (patch)
treece91b93c0b17886e453e0bfecba26c70a244a540 /demos/quickstart
parentcb78694cabf07515a097c44ef68e6d1df3fccf17 (diff)
Add Parameters property to TTranslate
Diffstat (limited to 'demos/quickstart')
-rw-r--r--demos/quickstart/protected/pages/Advanced/I18N.page6
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>
&lt;com:TTranslate Text="Goodbye" /&gt;
</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=&lt;%= time() %&gt;</tt>".
<com:TTextHighlighter Language="prado" CssClass="source">
-&lt;com:TTranslate time="late"&gt;
+&lt;com:TTranslate Parameters.time=&lt;%= time() %&gt; &gt;
The time is {time}.
&lt;/com:TTranslate&gt;
</com:TTextHighlighter>