Пример #1
0
 /**
  * Clears cache and updates translations file
  *
  * @return array
  */
 public function updateAndGetTranslations()
 {
     $this->eventManager->dispatch('adminhtml_cache_flush_system');
     $translations = $this->translateResource->getTranslationArray(null, $this->localeResolver->getLocale());
     $this->fileManager->updateTranslationFileContent(json_encode($translations));
     return $translations;
 }
Пример #2
0
 /**
  * Loading current translation from DB
  *
  * @return $this
  */
 protected function _loadDbTranslation()
 {
     $data = $this->_translateResource->getTranslationArray(null, $this->getLocale());
     $this->_addData($data);
     return $this;
 }
Пример #3
0
 /**
  * Loading current translation from DB
  *
  * @return $this
  */
 protected function _loadDbTranslation()
 {
     $data = $this->_translateResource->getTranslationArray(null, $this->getLocale());
     $this->_addData(array_map("htmlspecialchars_decode", $data));
     return $this;
 }
Пример #4
0
 /**
  * Loading current translation from DB
  *
  * @param bool $forceReload
  * @return $this
  */
 protected function _loadDbTranslation($forceReload = false)
 {
     $arr = $this->_translateResource->getTranslationArray(null, $this->getLocale());
     $this->_addData($arr, $this->getConfig('scope'), $forceReload);
     return $this;
 }