Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 /**
  * Loading current translation from DB
  *
  * @return $this
  */
 protected function _loadDbTranslation()
 {
     $data = $this->_translateResource->getTranslationArray(null, $this->getLocale());
     $this->_addData($data);
     return $this;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }