PHP 클래스 Neos\Flow\I18n\TranslationProvider\XliffTranslationProvider

상속: implements Neos\Flow\I18n\TranslationProvider\TranslationProviderInterface
파일 보기 프로젝트 열기: neos/flow-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$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