Esempio n. 1
0
 protected function _initLocale()
 {
     $session = Axis::session('install');
     $timezone = Axis_Locale::DEFAULT_TIMEZONE;
     $locale = Axis_Locale::DEFAULT_LOCALE;
     if (is_array($session->locale)) {
         $timezone = current($session->locale['timezone']);
     }
     if ($session->current_locale) {
         $locale = $session->current_locale;
     }
     Axis_Locale::setLocale($locale);
     Axis_Locale::setTimezone($timezone);
 }
Esempio n. 2
0
 protected function _initLocale()
 {
     $this->bootstrap('FrontController');
     //set default timezone affect on date() and Axis_Date
     Axis_Locale::setTimezone(Axis_Locale::getDefaultTimezone());
     $front = $this->getResource('FrontController');
     $front->registerPlugin(new Axis_Controller_Plugin_Locale(), 20);
 }