summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected
diff options
context:
space:
mode:
authorxue <>2006-04-20 17:09:09 +0000
committerxue <>2006-04-20 17:09:09 +0000
commitc54a230a5926086ff1b69a0dd7e6352dbc0b40ff (patch)
tree4006daa2f5f5d0cfb90ebc028b9820b077df4a69 /demos/quickstart/protected
parent3ff35ae583c52e54418a61cabf3282c00a8039d1 (diff)
Merge from 3.0 branch till 947.
Diffstat (limited to 'demos/quickstart/protected')
-rw-r--r--demos/quickstart/protected/pages/Advanced/I18N.page4
-rw-r--r--demos/quickstart/protected/pages/Configurations/Templates2.page2
-rw-r--r--demos/quickstart/protected/pages/Configurations/Templates3.page2
3 files changed, 4 insertions, 4 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/I18N.page b/demos/quickstart/protected/pages/Advanced/I18N.page
index 75ee59ee..f37e5cf6 100644
--- a/demos/quickstart/protected/pages/Advanced/I18N.page
+++ b/demos/quickstart/protected/pages/Advanced/I18N.page
@@ -114,7 +114,7 @@ function clickMe($sender,$param)
<com:TTextHighlighter CssClass="source">
function clickMe($sender,$param)
{
- $sender->Text=localize("Hello, world!");
+ $sender->Text=Prado::localize("Hello, world!");
}
</com:TTextHighlighter>
@@ -129,7 +129,7 @@ $message = "There are " . $num_users . " users online.";
This problem can be solved using the <tt>localize</tt> function with string substitution. For example, the <tt>$message</tt> string above can be constructed as follows.
<com:TTextHighlighter CssClass="source">
$num_users = 12;
-$message = localize("There are {num_users} users online.", array('num_users'=>$num_users));
+$message = Prado::localize("There are {num_users} users online.", array('num_users'=>$num_users));
</com:TTextHighlighter>
<p>Where the second parameter in <tt>localize</tt> takes an associative array with the key as the substitution to find in the text and replaced it with the associated value.
The <tt>localize</tt> function does not solve the problem of localizing languages that have plural forms, the solution is to use <a href="#choice-format">TChoiceFormat</a>.</p>
diff --git a/demos/quickstart/protected/pages/Configurations/Templates2.page b/demos/quickstart/protected/pages/Configurations/Templates2.page
index 9fc06fb4..17502151 100644
--- a/demos/quickstart/protected/pages/Configurations/Templates2.page
+++ b/demos/quickstart/protected/pages/Configurations/Templates2.page
@@ -93,7 +93,7 @@ Localization tags represent localized texts. They are in the following format,
&lt;%[string]%&gt;
</com:TTextHighlighter>
<p>
-where <tt>string</tt> will be translated to different languages according to the end-user's language preference.
+where <tt>string</tt> will be translated to different languages according to the end-user's language preference. Localization tags are in fact shortcuts to the function call <tt>Prado::localize(string)</tt>.
</p>
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Configurations/Templates3.page b/demos/quickstart/protected/pages/Configurations/Templates3.page
index b97b1583..457c1a38 100644
--- a/demos/quickstart/protected/pages/Configurations/Templates3.page
+++ b/demos/quickstart/protected/pages/Configurations/Templates3.page
@@ -84,7 +84,7 @@ Localization tags represent localized texts. They are in the following format,
&lt;%[string]%&gt;
</com:TTextHighlighter>
<p>
-where <tt>string</tt> will be translated to different languages according to the end-user's language preference. The localization tags are evaluated when the template is instantiated.
+where <tt>string</tt> will be translated to different languages according to the end-user's language preference. The localization tags are evaluated when the template is instantiated. Localization tags are in fact shortcuts to the function call <tt>Prado::localize(string)</tt>.
</p>
</com:TContent> \ No newline at end of file