summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Advanced/Samples
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Advanced/Samples')
-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();
}