summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Advanced
diff options
context:
space:
mode:
authorwei <>2006-01-29 23:23:16 +0000
committerwei <>2006-01-29 23:23:16 +0000
commit1b24a9a44fda6ac7f9fe34285286ca522a377630 (patch)
tree6213f8d5b6fcaccb2616e4d882ce32c99c2b5b45 /demos/quickstart/protected/pages/Advanced
parent82fe60baccecc1481de74f64fe36e38e6ccd3e48 (diff)
Moved localized template via changing culture to constructor
Diffstat (limited to 'demos/quickstart/protected/pages/Advanced')
-rw-r--r--demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php b/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
index 6451b506..6f868074 100644
--- a/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
+++ b/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
@@ -5,9 +5,9 @@ class Home extends TPage
/**
* Change the globalization culture using value from request "lang" parameter.
*/
- protected function onPreInit($param)
+ public function __construct()
{
- parent::onPreInit($param);
+ parent::__construct();
$lang = $this->Request['lang'];
if(CultureInfo::validCulture($lang)) //only valid lang is permitted
$this->Application->Globalization->Culture = $lang;
@@ -35,7 +35,7 @@ class Home extends TPage
*/
public function getCurrentCulture()
{
- $culture = $this->getApplication()->getGlobalization()->getCulture();
+ $culture = $this->Application->Globalization->Culture;
$cultureInfo = new CultureInfo($culture);
return $cultureInfo->getNativeName();
}