LanguagePackService
Read onlyYes
Service class handling language pack details Used by 'manage language packs' module and 'language packs command'
This class is only meant to be used within EXT:core and is not part of the TYPO3 Core API.
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Methods
- __construct() : mixed
- getActiveLanguages() : array<int, non-empty-string>
- List of languages active in this instance
- getAvailableLanguages() : array<string|int, mixed>
- Get list of available languages
- getExtensionLanguagePackDetails() : array<string|int, mixed>
- Create a list of loaded extensions and their language packs details
- getLanguageDetails() : array<string|int, mixed>
- Create an array with language details: active or not, iso codes, last update, .
- languagePackDownload() : string
- Download and unpack a single language pack of one extension.
- setLastUpdatedIsoCode() : void
- Set 'last update' timestamp in registry for a series of iso codes.
Methods
__construct()
public
__construct(EventDispatcherInterface $eventDispatcher, RequestFactory $requestFactory, LoggerInterface $logger, SystemResourceFactory $resourceFactory, SystemResourcePublisherInterface $resourcePublisher, Locales $locales, Registry $registry) : mixed
Parameters
- $eventDispatcher : EventDispatcherInterface
- $requestFactory : RequestFactory
- $logger : LoggerInterface
- $resourceFactory : SystemResourceFactory
- $resourcePublisher : SystemResourcePublisherInterface
- $locales : Locales
- $registry : Registry
getActiveLanguages()
List of languages active in this instance
public
getActiveLanguages() : array<int, non-empty-string>
Return values
array<int, non-empty-string>getAvailableLanguages()
Get list of available languages
public
getAvailableLanguages() : array<string|int, mixed>
Return values
array<string|int, mixed> —iso=>name
getExtensionLanguagePackDetails()
Create a list of loaded extensions and their language packs details
public
getExtensionLanguagePackDetails() : array<string|int, mixed>
Return values
array<string|int, mixed>getLanguageDetails()
Create an array with language details: active or not, iso codes, last update, .
public
getLanguageDetails() : array<string|int, mixed>
..
Return values
array<string|int, mixed>languagePackDownload()
Download and unpack a single language pack of one extension.
public
languagePackDownload(string $key, string $iso) : string
Parameters
- $key : string
-
Extension key
- $iso : string
-
Language iso code
Tags
Return values
string —One of 'update', 'new', 'skipped' or 'failed'
setLastUpdatedIsoCode()
Set 'last update' timestamp in registry for a series of iso codes.
public
setLastUpdatedIsoCode(array<string|int, string> $isos) : void
Parameters
- $isos : array<string|int, string>
-
List of iso code timestamps to set