Exemplo n.º 1
0
 private function getHtmlLang()
 {
     $langHelper = new LangHelper("HtmlModul_Lang", "lang", "htmlModul", $this->name, $this->thisLang);
     $menuLangType = $langHelper->getLangType();
     if ($menuLangType != -1) {
         $this->html = $langHelper->getLangValue("html");
     } else {
         $this->html = "";
     }
 }
Exemplo n.º 2
0
 private function getContactsWorkersData_Lang($worker)
 {
     $workerLeng = array();
     $langHelper = new LangHelper("ContactsWorkers_Lang", "lang", "worker", $worker, $this->thisLang);
     if ($langHelper->getLangType() != -1) {
         $workerLeng['fio'] = $langHelper->getLangValue("fio");
         $workerLeng['info'] = $langHelper->getLangValue("info");
     } else {
         $workerLeng['fio'] = "";
         $workerLeng['info'] = "";
     }
     return $workerLeng;
 }
Exemplo n.º 3
0
 /**
  * Получение переведенной информации о странице
  */
 private function getPageLangData()
 {
     $pageLang = new LangHelper("Pages_Lang", "lang", "page", $this->page, $this->lang);
     $pageLangType = $pageLang->getLangType();
     if ($pageLangType != -1) {
         $pageLangData = $pageLang->getLangData();
         $this->pageData['browserTitle'] = $pageLangData['browserTitle'];
         $this->pageData['pageTitle'] = $pageLangData['pageTitle'];
         $this->pageData['description'] = $pageLangData['description'];
         $this->pageData['keywords'] = $pageLangData['keywords'];
         $this->pageTitle = $this->pageData['pageTitle'];
         $this->browserTitle = $this->pageData['browserTitle'];
     } else {
         $this->pageData['browserTitle'] = "";
         $this->pageData['pageTitle'] = "";
         $this->pageData['description'] = "";
         $this->pageData['keywords'] = "";
         $this->pageTitle = "";
         $this->browserTitle = "";
         $this->errors[] = "Ни одного языка не задано для этой страницы";
     }
 }
Exemplo n.º 4
0
 private function getMaterialCategoryDataText($category)
 {
     $langHelper = new LangHelper("MaterialsCategories_Lang", "lang", "category", $category, $this->thisLang);
     $langType = $langHelper->getLangType();
     if ($langType != -1) {
         $categoryData['name'] = $langHelper->getLangValue("name");
         $categoryData['description'] = $langHelper->getLangValue("description");
     } else {
         $categoryData['name'] = $category;
         $categoryData['description'] = "";
     }
     return $categoryData;
 }
Exemplo n.º 5
0
 /**
  * Получение локализации элемента
  * @param type $unit элемент
  * @return array локализация
  */
 private function getContactsUnitsData_Lang($unit)
 {
     $text = array();
     $langHelper = new LangHelper("ContactsUnits_Lang", "lang", "unit", $unit, $this->thisLang);
     $langType = $langHelper->getLangType();
     if ($langType != -1) {
         $text['name'] = $langHelper->getLangValue("name");
         $text['adress'] = $langHelper->getLangValue("adress");
         $text['postAdress'] = $langHelper->getLangValue("postAdress");
         $text['text'] = $langHelper->getLangValue("text");
     } else {
         $text['name'] = "";
         $text['adress'] = "";
         $text['postAdress'] = "";
         $text['text'] = "";
     }
     return $text;
 }