Class TranslatePlural

Summary

Fully Qualified Name: Zend\I18n\View\Helper\TranslatePlural
Extends: AbstractTranslatorHelper

Description

View helper for translating plural messages.

Methods

Name Description Defined By
__invoke() Translate a plural message TranslatePlural
getTranslator() Returns translator used in helper AbstractTranslatorHelper
getTranslatorTextDomain() Return the translation text domain AbstractTranslatorHelper
getView() Get the view object AbstractHelper
hasTranslator() Checks if the helper has a translator AbstractTranslatorHelper
isTranslatorEnabled() Returns whether translator is enabled and should be used AbstractTranslatorHelper
setTranslator() Sets translator to use in helper AbstractTranslatorHelper
setTranslatorEnabled() Sets whether translator is enabled and should be used AbstractTranslatorHelper
setTranslatorTextDomain() Set translation text domain AbstractTranslatorHelper
setView() Set the View object AbstractHelper

Method Details

__invoke()

Translate a plural message

Parameter Name Type Description
$singular string
$plural string
$number int
$textDomain string
$locale string

Returns: string

getTranslator()

Returns translator used in helper

Returns: \Translator|null

getTranslatorTextDomain()

Return the translation text domain

Returns: string

getView()

Get the view object

Returns: null|\Renderer

hasTranslator()

Checks if the helper has a translator

Returns: bool

isTranslatorEnabled()

Returns whether translator is enabled and should be used

Returns: bool

setTranslator()

Sets translator to use in helper

Parameter Name Type Description
$translator \Translator [optional]
$textDomain string [optional]

Returns: \AbstractTranslatorHelper

setTranslatorEnabled()

Sets whether translator is enabled and should be used

Parameter Name Type Description
$enabled bool

Returns: \AbstractTranslatorHelper

setTranslatorTextDomain()

Set translation text domain

Parameter Name Type Description
$textDomain string

Returns: \AbstractTranslatorHelper

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

Top