summaryrefslogtreecommitdiff
path: root/demos/quickstart
diff options
context:
space:
mode:
authorxue <>2006-09-24 02:20:54 +0000
committerxue <>2006-09-24 02:20:54 +0000
commit75583383a6c00704837a753741abfc049dcc5a90 (patch)
treefcb5ac38b1eb3abfa5d17bdee494641be8d206ed /demos/quickstart
parent6fd29b65290509f55172efccaacb5f91a4a884df (diff)
Merge from 3.0 branch till 1443.
Diffstat (limited to 'demos/quickstart')
-rw-r--r--demos/quickstart/protected/pages/Advanced/I18N.page2
-rw-r--r--demos/quickstart/protected/pages/Configurations/UrlMapping.page18
2 files changed, 15 insertions, 5 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/I18N.page b/demos/quickstart/protected/pages/Advanced/I18N.page
index 1330091f..9c3d620f 100644
--- a/demos/quickstart/protected/pages/Advanced/I18N.page
+++ b/demos/quickstart/protected/pages/Advanced/I18N.page
@@ -40,6 +40,7 @@ First you need to include the <tt>System.I18N.*</tt> namespace to your paths.
<module id="globalization" class="TGlobalization">
<translation type="XLIFF"
source="MyApp.messages"
+ marker="@@"
autosave="true" cache="true" />
</module>
</com:TTextHighlighter>
@@ -48,6 +49,7 @@ First you need to include the <tt>System.I18N.*</tt> namespace to your paths.
where you are going to store your translate message catalogue. The <tt>autosave</tt>
attribute if enabled, saves untranslated messages back into the message catalogue.
With <tt>cache</tt> enabled, translated messages are saved in the application <tt>runtime/i18n</tt> directory.
+The <tt>marker</tt> value is used to surround any untranslated text.
</p>
<p>With the configuration complete, we can now start to localize your application. If you have <tt>autosave</tt> enabled, after running your application with some localization activity (i.e. translating some text), you will see a directory and a <tt>messages.xml</tt> created within your <tt>source</tt> directory.</p>
diff --git a/demos/quickstart/protected/pages/Configurations/UrlMapping.page b/demos/quickstart/protected/pages/Configurations/UrlMapping.page
index 22cb866a..dde6854f 100644
--- a/demos/quickstart/protected/pages/Configurations/UrlMapping.page
+++ b/demos/quickstart/protected/pages/Configurations/UrlMapping.page
@@ -20,13 +20,21 @@ file and before any services.
<p>The mapping format is as follows.
<com:TTextHighlighter Language="xml" CssClass="source">
<module id="friendly-url" class="System.Web.TUrlMapping">
- <url pageClass="ClassName" pattern="regexp" parameters.id="regexp" />
+ <url serviceParameter="ClassName" pattern="regexp" parameters.id="regexp" />
</module>
</com:TTextHighlighter>
</p>
-<p>The <tt>PageClass</tt> set the name of class that the matched URL will
-be requested.</p> The <tt>Pattern</tt> and <tt>Parameters</tt> attribute
+<p>The <tt>ServiceParameter</tt> and <tt>ServiceID</tt>
+ (the default ID is 'page') set the service parameter and service ID respectively.
+ The service parameter for the <tt>TPageService</tt> service is the
+ Page class name, e.g., for an URL "index.php?page=Home", "page" is the service ID and the service
+ parameter is "Home". Other services may use the service parameter and ID differently.
+See <a href="?page=Fundamentals.Services">Services</a> for further details.
+</p>
+
+<p>
+The <tt>Pattern</tt> and <tt>Parameters</tt> attribute
values are regular expression patterns that
determine the mapping criteria. The <tt>Pattern</tt> property takes
a regular expression with parameter names enclosed between a left brace '<tt>{</tt>'
@@ -34,13 +42,13 @@ and a right brace '<tt>}</tt>'. The pattens for each parameter can be set
using <tt>Parameters</tt>attribute collection.
For example,
<com:TTextHighlighter Language="xml" CssClass="source">
-<url pageClass="Pages.ShowArticles" pattern="articles/{year}/{month}/{day}"
+<url ServiceParameter="Pages.ShowArticles" pattern="articles/{year}/{month}/{day}"
parameters.year="\d{4}" parameters.month="\d{2}" parameters.day="\d+" />
</com:TTextHighlighter>
</p>
The example is equivalent, using regular expression only, to
<com:TTextHighlighter Language="xml" CssClass="source">
-<url pageClass="Pages.ShowArticles">
+<url ServiceParmaeter="Pages.ShowArticles">
<![CDATA[
articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d+)
]]>