TranslationDomainListCommand extends Command
Command for listing all translation domains and their corresponding label resource file locations.
This command scans all active packages (or all available packages with --all option) for language resource files (XLF/XML) and displays the translation domain name alongside the file location in EXT: syntax.
only for development purposes
Attributes
- #[AsCommand]
- 'language:domain:list'
- 'Lists all translation domains and their label resource file locations.'
Table of Contents
Methods
- __construct() : mixed
- configure() : void
- Defines the allowed options for this command
- countLabelsInResource() : int
- execute() : int
- Lists all translation domains and their file locations
- resolveOverridesForResource() : array<int, array{label: string, count: int, locale: string}>
- Resolve the resource override files configured via $GLOBALS['TYPO3_CONF_VARS']['LANG']['resourceOverrides'] for a given base resource.
Methods
__construct()
public
__construct(PackageManager $packageManager, TranslationDomainMapper $translationDomainMapper, LocalizationFactory $localizationFactory, LabelFileResolver $labelFileResolver, LanguagePackService $languagePackService) : mixed
Parameters
- $packageManager : PackageManager
- $translationDomainMapper : TranslationDomainMapper
- $localizationFactory : LocalizationFactory
- $labelFileResolver : LabelFileResolver
- $languagePackService : LanguagePackService
configure()
Defines the allowed options for this command
protected
configure() : void
countLabelsInResource()
protected
countLabelsInResource(string $fileReference[, string $languageKey = 'en' ]) : int
Parameters
- $fileReference : string
- $languageKey : string = 'en'
Return values
intexecute()
Lists all translation domains and their file locations
protected
execute(InputInterface $input, OutputInterface $output) : int
Parameters
- $input : InputInterface
- $output : OutputInterface
Return values
intresolveOverridesForResource()
Resolve the resource override files configured via $GLOBALS['TYPO3_CONF_VARS']['LANG']['resourceOverrides'] for a given base resource.
protected
resolveOverridesForResource(string $resource) : array<int, array{label: string, count: int, locale: string}>
Parameters
- $resource : string