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(); } } }
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(); } } }