summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Advanced
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Advanced')
-rw-r--r--demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php5
-rw-r--r--demos/quickstart/protected/pages/Advanced/Samples/I18N/config.xml4
2 files changed, 5 insertions, 4 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php b/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
index d9a261d6..f0d127b9 100644
--- a/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
+++ b/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
@@ -1,4 +1,4 @@
-<?php
+<?php
class Home extends TPage
{
@@ -9,7 +9,8 @@ class Home extends TPage
{
parent::__construct();
$lang = $this->Request['lang'];
- if(CultureInfo::validCulture($lang)) //only valid lang is permitted
+ $info = new CultureInfo();
+ if($info->validCulture($lang)) //only valid lang is permitted
$this->getApplication()->getGlobalization()->setCulture($lang);
}
diff --git a/demos/quickstart/protected/pages/Advanced/Samples/I18N/config.xml b/demos/quickstart/protected/pages/Advanced/Samples/I18N/config.xml
index e6fa03ec..5c80f48b 100644
--- a/demos/quickstart/protected/pages/Advanced/Samples/I18N/config.xml
+++ b/demos/quickstart/protected/pages/Advanced/Samples/I18N/config.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<configuration>
<paths>
@@ -8,7 +8,7 @@
</paths>
<modules>
- <module id="globalization" class="TGlobalizationAutoDetect">
+ <module id="globalization2" class="TGlobalizationAutoDetect">
<translation type="XLIFF" source="I18NSample.messages" />
</module>
</modules>