PHP Interface Neos\Flow\I18n\TranslationProvider\TranslationProviderInterface

Concrete implementation may throw an UnsupportedTranslationMethodException if particular method is not available / implemented.
Mostrar archivo Open project: neos/flow-development-collection Interface Usage Examples

Public Methods

Method Description
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.

Method Details

getTranslationById() public method

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 Name of file with translations, base path is $packageKey/Resources/Private/Locale/Translations/
$packageKey string Key of the package containing the source file
return mixed Translated label or FALSE on failure

getTranslationByOriginalLabel() public method

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 Name of file with translations, base path is $packageKey/Resources/Private/Locale/Translations/
$packageKey string Key of the package containing the source file
return mixed Translated label or FALSE on failure