diff --git a/Classes/Backend/Preview/Yellowpages2PluginPreview.php b/Classes/Backend/Preview/Yellowpages2PluginPreview.php index 473ee57..9a8a37a 100644 --- a/Classes/Backend/Preview/Yellowpages2PluginPreview.php +++ b/Classes/Backend/Preview/Yellowpages2PluginPreview.php @@ -13,11 +13,11 @@ use TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer; use TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem; +use TYPO3\CMS\Core\Localization\LanguageService; use TYPO3\CMS\Core\Service\FlexFormService; use TYPO3\CMS\Core\View\ViewFactoryData; use TYPO3\CMS\Core\View\ViewFactoryInterface; use TYPO3\CMS\Core\View\ViewInterface; -use TYPO3\CMS\Extbase\Utility\LocalizationUtility; /** * Add plugin preview for EXT:yellowpages2 @@ -88,7 +88,7 @@ protected function addPluginName(ViewInterface $view, array $ttContentRecord): v $view->assign( 'pluginName', - LocalizationUtility::translate('LLL:EXT:yellowpages2/Resources/Private/Language/locallang_db.xlf:' . $langKey), + $this->getLanguageService()->sL('LLL:EXT:yellowpages2/Resources/Private/Language/locallang_db.xlf:' . $langKey), ); } @@ -105,4 +105,9 @@ protected function getPiFlexformData(array $ttContentRecord): array return $data; } + + protected function getLanguageService(): LanguageService + { + return $GLOBALS['LANG']; + } }