category Zend
package Zend_I18n
subpackage Translator

 Methods

Returns translator used in object

getTranslator() : \Zend\I18n\Translator\Translator | null

Return the translation text domain

getTranslatorTextDomain() : string

Returns

string

Checks if the object has a translator

hasTranslator() : bool

Returns

bool

Returns whether translator is enabled and should be used

isTranslatorEnabled() : bool

Returns

bool

Sets translator to use in helper

setTranslator(\Zend\I18n\Translator\Translator $translator, string $textDomain) : \Zend\I18n\Translator\TranslatorAwareInterface

Parameters

$translator

\Zend\I18n\Translator\Translator

[optional] translator. Default is null, which sets no translator.

$textDomain

string

[optional] text domain Default is null, which skips setTranslatorTextDomain

Returns

Sets whether translator is enabled and should be used

setTranslatorEnabled(bool $enabled) : \Zend\I18n\Translator\TranslatorAwareInterface

Parameters

$enabled

bool

[optional] whether translator should be used. Default is true.

Returns

Set translation text domain

setTranslatorTextDomain(string $textDomain) : \Zend\I18n\Translator\TranslatorAwareInterface

Parameters

$textDomain

string

Returns