diff options
| author | wei <> | 2006-06-01 03:53:17 +0000 | 
|---|---|---|
| committer | wei <> | 2006-06-01 03:53:17 +0000 | 
| commit | 6c51bde9db85fa63adbddf2240a521b437bbb06a (patch) | |
| tree | ce91b93c0b17886e453e0bfecba26c70a244a540 /demos/quickstart/protected/pages | |
| parent | cb78694cabf07515a097c44ef68e6d1df3fccf17 (diff) | |
Add Parameters property to TTranslate
Diffstat (limited to 'demos/quickstart/protected/pages')
| -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>
 | 
