From 65731b050199ab7ecdd4027fa2d65f2175fe561e Mon Sep 17 00:00:00 2001
From: wei <>
Date: Thu, 11 Jan 2007 05:06:31 +0000
Subject: Add structure for localized quickstart.
---
.gitattributes | 3 +++
.../protected/QuickStartGlobalization.php | 31 ++++++++++++++++++++++
demos/quickstart/protected/application.xml | 17 +++++++++---
demos/quickstart/protected/controls/Layout.php | 18 +++++++++++++
demos/quickstart/protected/controls/Layout.tpl | 12 +++++++++
.../quickstart/protected/controls/fr/TopicList.tpl | 10 +++++++
.../pages/GettingStarted/fr/Introduction.page | 4 +++
demos/quickstart/themes/PradoSoft/style.css | 18 +++++++++++++
8 files changed, 110 insertions(+), 3 deletions(-)
create mode 100644 demos/quickstart/protected/QuickStartGlobalization.php
create mode 100644 demos/quickstart/protected/controls/fr/TopicList.tpl
create mode 100644 demos/quickstart/protected/pages/GettingStarted/fr/Introduction.page
diff --git a/.gitattributes b/.gitattributes
index d43a248b..b7df44ef 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -810,6 +810,7 @@ demos/quickstart/images/star5.gif -text
demos/quickstart/index.php -text
demos/quickstart/index2.php -text
demos/quickstart/protected/.htaccess -text
+demos/quickstart/protected/QuickStartGlobalization.php -text
demos/quickstart/protected/application.xml -text
demos/quickstart/protected/controls/DocLink.php -text
demos/quickstart/protected/controls/Layout.php -text
@@ -822,6 +823,7 @@ demos/quickstart/protected/controls/SearchBox.php -text
demos/quickstart/protected/controls/SearchBox.tpl -text
demos/quickstart/protected/controls/TopicList.php -text
demos/quickstart/protected/controls/TopicList.tpl -text
+demos/quickstart/protected/controls/fr/TopicList.tpl -text
demos/quickstart/protected/index/Zend/Exception.php -text
demos/quickstart/protected/index/Zend/LICENSE.txt -text
demos/quickstart/protected/index/Zend/Search/Exception.php -text
@@ -1128,6 +1130,7 @@ demos/quickstart/protected/pages/GettingStarted/Installation.page -text
demos/quickstart/protected/pages/GettingStarted/Introduction.page -text
demos/quickstart/protected/pages/GettingStarted/Upgrading.page -text
demos/quickstart/protected/pages/GettingStarted/directory.gif -text
+demos/quickstart/protected/pages/GettingStarted/fr/Introduction.page -text
demos/quickstart/protected/pages/GettingStarted/sequence.gif -text
demos/quickstart/protected/pages/GettingStarted/sequence.vsd -text
demos/quickstart/protected/pages/Search.page -text
diff --git a/demos/quickstart/protected/QuickStartGlobalization.php b/demos/quickstart/protected/QuickStartGlobalization.php
new file mode 100644
index 00000000..6a0b0fb2
--- /dev/null
+++ b/demos/quickstart/protected/QuickStartGlobalization.php
@@ -0,0 +1,31 @@
+Application->OnBeginRequest[] = array($this, 'beginRequest');
+ }
+
+ public function beginRequest($sender, $param)
+ {
+ if(null == ($culture=$this->Request['lang']))
+ {
+ if(null !== ($cookie=$this->Request->Cookies['lang']))
+ $culture = $cookie->getValue();
+ }
+
+ if(is_string($culture))
+ {
+ $info = new CultureInfo();
+ if($info->validCulture($culture))
+ {
+ $this->setCulture($culture);
+ $this->Response->Cookies[] = new THttpCookie('lang',$culture);
+ }
+ }
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/demos/quickstart/protected/application.xml b/demos/quickstart/protected/application.xml
index 3e2374d8..777dd86b 100644
--- a/demos/quickstart/protected/application.xml
+++ b/demos/quickstart/protected/application.xml
@@ -1,6 +1,11 @@