From 6c51bde9db85fa63adbddf2240a521b437bbb06a Mon Sep 17 00:00:00 2001 From: wei <> Date: Thu, 1 Jun 2006 03:53:17 +0000 Subject: Add Parameters property to TTranslate --- demos/quickstart/protected/pages/Advanced/I18N.page | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'demos/quickstart/protected/pages') 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 TTranslate.

<com:TTranslate Text="Goodbye" /> -

TTranslate can also perform string substitution. Any attributes of TTranslate will be substituted with {attribute name} in the translation. E.g.

+

TTranslate can also perform string substitution. +The Parameters 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 "Parameters.time=<%= time() %>". -<com:TTranslate time="late"> +<com:TTranslate Parameters.time=<%= time() %> > The time is {time}. </com:TTranslate> -- cgit v1.2.3