/**
  * @return mixed
  */
 function fetchExistLanguage()
 {
     $lang_priority = array(SJB_Request::getVar('lang', null), $this->context->getLang(), $this->context->getDefaultLang());
     foreach ($lang_priority as $lang) {
         if (!$lang) {
             continue;
         }
         $this->context->langSettings->setCurrentLangID($lang);
         if ($this->i18n->languageExists($lang) && $this->i18n->isLanguageActive($lang)) {
             return $lang;
         }
     }
 }
示例#2
0
 /**
  * @return LangData
  */
 function &_getLangData()
 {
     $langData = $this->datasource->getLanguageData($this->context->getLang());
     return $langData;
 }