Esempio n. 1
0
 /**
  * Fetch the translation for given extension and locale
  *
  * @param array $data The request data
  * @return void
  */
 public function updateTranslationAction(array $data)
 {
     $response = array('success' => false);
     if (!empty($data['extension']) && !empty($data['locale'])) {
         $result = $this->translationService->updateTranslation($data['extension'], $data['locale']);
         if (empty($result[$data['extension']][$data['locale']]['error'])) {
             $response = array('success' => true, 'result' => $result);
         }
     }
     $this->view->assign('response', $response);
 }
 /**
  * Fetch the translation for given extension and locale
  *
  * @param array $data The request data
  * @return void
  */
 public function updateTranslationAction(array $data)
 {
     $response = array('success' => false);
     if (!empty($data['extension']) && !empty($data['locale'])) {
         $result = $this->translationService->updateTranslation($data['extension'], $data['locale']);
         if (empty($result[$data['extension']][$data['locale']]['error'])) {
             $response = array('success' => true, 'result' => $result);
         }
     }
     $this->view->assign('response', $response);
     // Flush language cache
     GeneralUtility::makeInstance(CacheManager::class)->getCache('l10n')->flush();
 }