Skip to content

Commit

Permalink
FIX: page module dead in offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kitzberger committed Oct 6, 2023
1 parent 9083a97 commit 66a3605
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Classes/Service/DeeplService.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ public function __construct(
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$this->deeplSettingsRepository = $objectManager->get(SettingsRepository::class);

$this->loadSupportedLanguages();
$this->apiSupportedLanguages['target'] = $this->deeplSettingsRepository->getSupportedLanguages($this->apiSupportedLanguages['target']);
$config = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['wv_deepltranslate'];

if ($config['apiKey'] && $config['apiUrl']) {
$this->loadSupportedLanguages();
$this->apiSupportedLanguages['target'] = $this->deeplSettingsRepository->getSupportedLanguages($this->apiSupportedLanguages['target']);
}
}

/**
Expand Down

0 comments on commit 66a3605

Please sign in to comment.