\Translate\Mvc\Controller\PluginTranslateControllerPlugin

Controller plugin TranslateControllerPlugin that is responsible for translating messages in a controller

Summary

Methods
Properties
Constants
__construct()
translate()
No public properties found
No constants found
No protected methods found
$translator
N/A
No private methods found
No private properties found
N/A

Properties

$translator

$translator : \Translate\Mvc\Controller\Plugin\Zend\Mvc\I18n\Translator

The translator

Type

\Translate\Mvc\Controller\Plugin\Zend\Mvc\I18n\Translator

Methods

__construct()

__construct(\Translate\Mvc\Controller\Plugin\Zend\Mvc\I18n\Translator  $translator) 

Constructor

Parameters

\Translate\Mvc\Controller\Plugin\Zend\Mvc\I18n\Translator $translator

translate()

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

Translate a message

Parameters

string $message

the untranslated message

string $textDomain

text domain which is an alias for controller alias NOTE THAT THIS IS NOT USED FOR PRESENT APPLICATION

string $locale

the locale for instance en_GB NOTE THAT THIS IS NOT USED FOR PRESENT APPLICATION

Returns

string —

the translated message