示例#1
0
 public function reloadLangFromAuthorPreference()
 {
     $lang = $this->Author->get('language');
     if ($lang && $lang != self::lang()) {
         self::$_lang = $lang;
         if ($lang != 'en') {
             Lang::loadAll($this->ExtensionManager);
         } else {
             // As there is no English dictionary the default dictionary needs to be cleared
             Lang::clear();
         }
     }
 }
示例#2
0
 public function reloadLangFromUserPreference()
 {
     $lang = $this->User->language;
     if ($lang && $lang != self::lang()) {
         self::$_lang = $lang;
         if ($lang != 'en') {
             Lang::loadAll();
         } else {
             // As there is no English dictionary the default dictionary needs to be cleared
             Lang::clear();
         }
     }
 }