private function getLocalizedLabelsFromFile($extensionKey)
    {
        if ($extensionKey === '') {
            throw new \InvalidArgumentException('$extensionKey must not be empty.', 1331489618);
        }

        /** @var LocalizationFactory $languageFactory */
        $languageFactory = GeneralUtility::makeInstance(LocalizationFactory::class);
        $languageFile = 'EXT:' . $extensionKey . '/' . self::LANGUAGE_FILE_PATH;
        $localizedLabels = $languageFactory->getParsedData($languageFile, $this->languageKey, 'utf-8', 0);

        if ($this->alternativeLanguageKey !== '') {
            $alternativeLabels = $languageFactory->getParsedData($languageFile, $this->languageKey, 'utf-8', 0);
            $localizedLabels = array_merge(
                $alternativeLabels,
                is_array($localizedLabels) ? $localizedLabels : []
            );
        }

        return $localizedLabels;
    }
private function getLocalizedLabelsFromFile($extensionKey)
    {
        if ($extensionKey === '') {
            throw new \InvalidArgumentException('$extensionKey must not be empty.', 1331489618);
        }

        /** @var LocalizationFactory $languageFactory */
        $languageFactory = GeneralUtility::makeInstance(LocalizationFactory::class);
        $languageFile = 'EXT:' . $extensionKey . '/' . self::LANGUAGE_FILE_PATH;
        $localizedLabels = $languageFactory->getParsedData($languageFile, $this->languageKey, 'utf-8', 0);

        if ($this->alternativeLanguageKey !== '') {
            $alternativeLabels = $languageFactory->getParsedData($languageFile, $this->languageKey, 'utf-8', 0);
            $localizedLabels = array_merge(
                $alternativeLabels,
                is_array($localizedLabels) ? $localizedLabels : []
            );
        }

        return $localizedLabels;
    }
private function getLocalizedLabelsFromFile ( $ extensionKey ) { if ( $ extensionKey === '' ) { throw new \ InvalidArgumentException ( '$extensionKey must not be empty.' , 1331489618 ) ; } /** @var LocalizationFactory $languageFactory */ $ languageFactory = GeneralUtility :: makeInstance ( LocalizationFactory :: class ) ; $ languageFile = 'EXT:' . $ extensionKey . '/' . self :: LANGUAGE_FILE_PATH ; $ localizedLabels = $ languageFactory -> getParsedData ( $ languageFile , $ this -> languageKey , 'utf-8' , 0 ) ; if ( $ this -> alternativeLanguageKey !== '' ) { $ alternativeLabels = $ languageFactory -> getParsedData ( $ languageFile , $ this -> languageKey , 'utf-8' , 0 ) ; $ localizedLabels = array_merge ( $ alternativeLabels , is_array ( $ localizedLabels ) ? $ localizedLabels : [ ] ) ; } return $ localizedLabels ; }
Returns the localized labels from an extension's language file.

@param string $extensionKey
key of the extension to get the localized labels from,
must not be empty, and the corresponding extension must be loaded

@return string[] the localized labels from an extension's language file, will be empty if there are none
Returns the localized labels from an extension s language file .