\Translate\I18n\TranslatorTranslator

Class Translator which overrides Zend\I18n\Translator\Translator So that it uses updated logic and attaches the translation saver

Summary

Methods
Properties
Constants
setTranslationSaver()
getTranslationSaver()
translate()
No public properties found
No constants found
No protected methods found
$translationSaver
N/A
No private methods found
No private properties found
N/A

Properties

Methods

setTranslationSaver()

setTranslationSaver(\Translate\Service\TranslationSaverInterface  $translationSaver) 

Set the translation saver

Parameters

\Translate\Service\TranslationSaverInterface $translationSaver

the class that updated the translation files

translate()

translate(string  $message, string  $textDomain = 'default', string  $passedLocale = null) : string

Translate a message (string).

Parameters

string $message

the untranslated string

string $textDomain

the text domain passed to translate method (always default)

string $passedLocale

locale passed to translate method normally null since locale is defined in URI

Returns

string —

the translated message