PHP Класс Neos\Flow\I18n\TranslationProvider\XliffTranslationProvider

Наследование: implements Neos\Flow\I18n\TranslationProvider\TranslationProviderInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$localizationService Neos\Flow\I18n\Service
$models array This is an associative array with pairs as follow: ['filename'] => $model,
$pluralsReader Neos\Flow\I18n\Cldr\Reader\PluralsReader
$xliffBasePath string An absolute path to the directory where translation files reside.

Открытые методы

Метод Описание
getTranslationById ( string $labelId, Locale $locale, string $pluralForm = null, string $sourceName = 'Main', string $packageKey = 'Neos.Flow' ) : mixed Returns label for a key ($labelId) from a file defined by $sourceName.
getTranslationByOriginalLabel ( string $originalLabel, Locale $locale, string $pluralForm = null, string $sourceName = 'Main', string $packageKey = 'Neos.Flow' ) : mixed Returns translated label of $originalLabel from a file defined by $sourceName.
injectLocalizationService ( Service $localizationService ) : void
injectPluralsReader ( PluralsReader $pluralsReader ) : void

Защищенные методы

Метод Описание
getModel ( string $packageKey, string $sourceName, Locale $locale ) : XliffModel Returns a XliffModel instance representing desired XLIFF file.

Описание методов

getModel() защищенный Метод

Will return existing instance if a model for given $sourceName was already requested before. Returns FALSE when $sourceName doesn't point to existing file.
protected getModel ( string $packageKey, string $sourceName, Locale $locale ) : XliffModel
$packageKey string Key of the package containing the source file
$sourceName string Relative path to existing CLDR file
$locale Neos\Flow\I18n\Locale Locale object
Результат Neos\Flow\I18n\Xliff\XliffModel New or existing instance

getTranslationById() публичный Метод

Chooses particular form of label if available and defined in $pluralForm.
public getTranslationById ( string $labelId, Locale $locale, string $pluralForm = null, string $sourceName = 'Main', string $packageKey = 'Neos.Flow' ) : mixed
$labelId string Key used to find translated label
$locale Neos\Flow\I18n\Locale Locale to use
$pluralForm string One of RULE constants of PluralsReader
$sourceName string A relative path to the filename with translations (labels' catalog)
$packageKey string Key of the package containing the source file
Результат mixed Translated label or FALSE on failure

getTranslationByOriginalLabel() публичный Метод

Chooses particular form of label if available and defined in $pluralForm.
public getTranslationByOriginalLabel ( string $originalLabel, Locale $locale, string $pluralForm = null, string $sourceName = 'Main', string $packageKey = 'Neos.Flow' ) : mixed
$originalLabel string Label used as a key in order to find translation
$locale Neos\Flow\I18n\Locale Locale to use
$pluralForm string One of RULE constants of PluralsReader
$sourceName string A relative path to the filename with translations (labels' catalog)
$packageKey string Key of the package containing the source file
Результат mixed Translated label or FALSE on failure

injectLocalizationService() публичный Метод

public injectLocalizationService ( Service $localizationService ) : void
$localizationService Neos\Flow\I18n\Service
Результат void

injectPluralsReader() публичный Метод

public injectPluralsReader ( PluralsReader $pluralsReader ) : void
$pluralsReader Neos\Flow\I18n\Cldr\Reader\PluralsReader
Результат void

Описание свойств

$localizationService защищенное свойство

protected Service,Neos\Flow\I18n $localizationService
Результат Neos\Flow\I18n\Service

$models защищенное свойство

This is an associative array with pairs as follow: ['filename'] => $model,
protected array $models
Результат array

$pluralsReader защищенное свойство

protected PluralsReader,Neos\Flow\I18n\Cldr\Reader $pluralsReader
Результат Neos\Flow\I18n\Cldr\Reader\PluralsReader

$xliffBasePath защищенное свойство

An absolute path to the directory where translation files reside.
protected string $xliffBasePath
Результат string