package Default

 Methods

Returns translator used in object

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

Returns

\Zend\I18n\Translator\TranslatorInterfacenull

Return the translation text domain

getTranslatorTextDomain() : string

Returns

string

Checks if the object has a translator

hasTranslator() : boolean

Returns

boolean

Returns whether translator is enabled and should be used

isTranslatorEnabled() : boolean

Returns

boolean

Sets translator to use in helper

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

Parameters

$translator

\Zend\I18n\Translator\TranslatorInterface

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

$textDomain

string

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

Returns

\Zend\I18n\Translator\TranslatorAwareInterface

Sets whether translator is enabled and should be used

setTranslatorEnabled(boolean $enabled = true) : \Zend\I18n\Translator\TranslatorAwareInterface

Parameters

$enabled

boolean

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

Returns

\Zend\I18n\Translator\TranslatorAwareInterface

Set translation text domain

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

Parameters

$textDomain

string

Returns

\Zend\I18n\Translator\TranslatorAwareInterface