Zend\I18n\View\Helper\TranslatePlural
View helper for translating plural messages.
Synopsis
class TranslatePlural
extends AbstractTranslatorHelper
{
- // Inherited members from AbstractTranslatorHelper
- protected TranslatorInterface $translator;
- protected string $translatorTextDomain;
- protected bool $translatorEnabled;
- // Inherited members from AbstractHelper
- protected RendererInterface $view;
- // methods
- public string __invoke()
- // Inherited methods from AbstractTranslatorHelper
- public AbstractTranslatorHelper setTranslator()
- public Translator|null getTranslator()
- public bool hasTranslator()
- public AbstractTranslatorHelper setTranslatorEnabled()
- public bool isTranslatorEnabled()
- public AbstractTranslatorHelper setTranslatorTextDomain()
- public string getTranslatorTextDomain()
- // Inherited methods from AbstractHelper
- public AbstractHelper setView()
- public null|Renderer getView()
Hierarchy
Members
protected
- $translator
—
Zend\I18n\Translator\TranslatorInterface
Translator (optional) - $translatorEnabled
—
Zend\I18n\View\Helper\bool
Whether translator should be used - $translatorTextDomain
—
string
Translator text domain (optional) - $view
—
Zend\View\Renderer\RendererInterface
View object instance
Methods
public
- __invoke() — Translate a plural message
Inherited from Zend\I18n\View\Helper\AbstractTranslatorHelper
public
- getTranslator() — Returns translator used in helper
- getTranslatorTextDomain() — Return the translation text domain
- hasTranslator() — Checks if the helper has a translator
- isTranslatorEnabled() — Returns whether translator is enabled and should be used
- setTranslator() — Sets translator to use in helper
- setTranslatorEnabled() — Sets whether translator is enabled and should be used
- setTranslatorTextDomain() — Set translation text domain