Class Translator

Summary

Fully Qualified Name: Zend\Mvc\I18n\Translator
Implements: TranslatorInterface, TranslatorInterface

Description

Methods

Name Description Defined By
__call() Proxy unknown method calls to underlying translator instance Translator
__construct() Translator
getTranslator() Translator
translate() Translate a message using the given text domain and locale Translator
translatePlural() Provide a pluralized translation of the given string using the given text domain and locale Translator

Method Details

__call()

Proxy unknown method calls to underlying translator instance

Note: this method is only implemented to keep backwards compatibility with pre-2.3.0 code.

Parameter Name Type Description
$method string
$args array

Returns: mixed

__construct()

Parameter Name Type Description
$translator \I18nTranslatorInterface

Returns:

getTranslator()

Returns: \I18nTranslatorInterface

translate()

Translate a message using the given text domain and locale

Parameter Name Type Description
$message string
$textDomain string
$locale string

Returns: string

translatePlural()

Provide a pluralized translation of the given string using the given text domain and locale

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

Returns: string

Top