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.php88
-rw-r--r--demos/quickstart/protected/pages/Advanced/Samples/I18N/LanguageList.php36
2 files changed, 62 insertions, 62 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php b/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
index cce1ed4e..634c1773 100644
--- a/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
+++ b/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
@@ -1,45 +1,45 @@
-<?php
-
-class Home extends TPage
-{
- /**
- * Change the globalization culture using value from request "lang" parameter.
- */
- public function __construct()
- {
- parent::__construct();
- $lang = $this->Request['lang'];
- $info = new CultureInfo();
- if($info->validCulture($lang)) //only valid lang is permitted
- $this->getApplication()->getGlobalization()->setCulture($lang);
- }
-
- /**
- * Initialize the page with some arbituary data.
- * @param TEventParameter event parameter.
- */
- public function onLoad($param)
- {
- parent::onLoad($param);
- $time1 = $this->Time1;
- $time1->Value = time();
-
- $number2 = $this->Number2;
- $number2->Value = 46412.416;
-
- $this->dataBind();
- }
-
- /**
- * Get the localized current culture name.
- * @return string localized curreny culture name.
- */
- public function getCurrentCulture()
- {
- $culture = $this->getApplication()->getGlobalization()->getCulture();
- $cultureInfo = new CultureInfo($culture);
- return $cultureInfo->getNativeName();
- }
-}
-
+<?php
+
+class Home extends TPage
+{
+ /**
+ * Change the globalization culture using value from request "lang" parameter.
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $lang = $this->Request['lang'];
+ $info = new CultureInfo();
+ if($info->validCulture($lang)) //only valid lang is permitted
+ $this->getApplication()->getGlobalization()->setCulture($lang);
+ }
+
+ /**
+ * Initialize the page with some arbituary data.
+ * @param TEventParameter event parameter.
+ */
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ $time1 = $this->Time1;
+ $time1->Value = time();
+
+ $number2 = $this->Number2;
+ $number2->Value = 46412.416;
+
+ $this->dataBind();
+ }
+
+ /**
+ * Get the localized current culture name.
+ * @return string localized curreny culture name.
+ */
+ public function getCurrentCulture()
+ {
+ $culture = $this->getApplication()->getGlobalization()->getCulture();
+ $cultureInfo = new CultureInfo($culture);
+ return $cultureInfo->getNativeName();
+ }
+}
+
?> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Advanced/Samples/I18N/LanguageList.php b/demos/quickstart/protected/pages/Advanced/Samples/I18N/LanguageList.php
index d3db187d..bdeb5039 100644
--- a/demos/quickstart/protected/pages/Advanced/Samples/I18N/LanguageList.php
+++ b/demos/quickstart/protected/pages/Advanced/Samples/I18N/LanguageList.php
@@ -1,19 +1,19 @@
-<?php
-/**
- * Language List
- * @author $Author: weizhuo $
- * @version $Id$
- * @package prado.examples
- */
-
-/**
- *
- * @author $Author: weizhuo $
- * @version $Id$
- */
-class LanguageList extends TTemplateControl
-{
-
-}
-
+<?php
+/**
+ * Language List
+ * @author $Author: weizhuo $
+ * @version $Id$
+ * @package prado.examples
+ */
+
+/**
+ *
+ * @author $Author: weizhuo $
+ * @version $Id$
+ */
+class LanguageList extends TTemplateControl
+{
+
+}
+
?> \ No newline at end of file