LanguagePackService
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:install and is not part of the TYPO3 Core API.
Table of Contents
Properties
- $eventDispatcher : EventDispatcherInterface
- $locales : Locales
- $logger : LoggerInterface
- $registry : Registry
- $requestFactory : RequestFactory
- $resourcePublisher : SystemResourcePublisherInterface
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() : mixed
- Set 'last update' timestamp in registry for a series of iso codes.
- getFormattedDate() : string|null
- Format a timestamp to a formatted date string
- unzipTranslationFile() : mixed
- Unzip a language zip file
Properties
$eventDispatcher read-only
        protected
            EventDispatcherInterface
    $eventDispatcher
    
    
    
    
    
    
$locales
        protected
            Locales
    $locales
    
    
    
    
    
    
$logger read-only
        protected
            LoggerInterface
    $logger
    
    
    
    
    
    
$registry
        protected
            Registry
    $registry
    
    
    
    
    
    
$requestFactory read-only
        protected
            RequestFactory
    $requestFactory
    
    
    
    
    
    
$resourcePublisher read-only
        protected
            SystemResourcePublisherInterface
    $resourcePublisher
    
    
    
    
    
    
Methods
__construct()
    public
                    __construct(EventDispatcherInterface $eventDispatcher, RequestFactory $requestFactory, LoggerInterface $logger, SystemResourcePublisherInterface $resourcePublisher) : mixed
    Parameters
- $eventDispatcher : EventDispatcherInterface
- $requestFactory : RequestFactory
- $logger : LoggerInterface
- $resourcePublisher : SystemResourcePublisherInterface
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) : mixed
    Parameters
- $isos : array<string|int, string>
- 
                    List of iso code timestamps to set 
Tags
getFormattedDate()
Format a timestamp to a formatted date string
    protected
                    getFormattedDate(int|null $timestamp) : string|null
    Parameters
- $timestamp : int|null
Return values
string|nullunzipTranslationFile()
Unzip a language zip file
    protected
                    unzipTranslationFile(string $file, string $path) : mixed
    Parameters
- $file : string
- 
                    path to zip file 
- $path : string
- 
                    path to extract to