Fully Qualified Name: | Zend\I18n\View\Helper\TranslatePlural |
Extends: | AbstractTranslatorHelper |
View helper for translating plural messages.
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 |
Translate a plural message
Parameter Name | Type | Description |
---|---|---|
$singular | string | |
$plural | string | |
$number | int | |
$textDomain | string | |
$locale | string |
Returns: string
Returns translator used in helper
Returns: \Translator|null
Return the translation text domain
Returns: string
Get the view object
Returns: null|\Renderer
Checks if the helper has a translator
Returns: bool
Returns whether translator is enabled and should be used
Returns: bool
Sets translator to use in helper
Parameter Name | Type | Description |
---|---|---|
$translator | \Translator | [optional] |
$textDomain | string | [optional] |
Returns: \AbstractTranslatorHelper
Sets whether translator is enabled and should be used
Parameter Name | Type | Description |
---|---|---|
$enabled | bool |
Returns: \AbstractTranslatorHelper
Set translation text domain
Parameter Name | Type | Description |
---|---|---|
$textDomain | string |
Returns: \AbstractTranslatorHelper
Set the View object
Parameter Name | Type | Description |
---|---|---|
$view | \Renderer |
Returns: \AbstractHelper