summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php')
-rw-r--r--demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php88
1 files changed, 44 insertions, 44 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