Methods

Proxy unknown method calls to underlying translator instance

__call(string $method, array $args) : mixed

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

deprecated

Parameters

$method

string

$args

array

Returns

mixed

__construct()

__construct(\Zend\I18n\Translator\TranslatorInterface $translator) 

Translate a message using the given text domain and locale

translate(string $message, string $textDomain, string $locale) : string

Parameters

$message

string

$textDomain

string

$locale

string

Returns

string

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

translatePlural(string $singular, string $plural, string $number, string $textDomain, string $locale) : string

Parameters

$singular

string

$plural

string

$number

string

$textDomain

string

$locale

string

Returns

string

 Properties

 

$translator

$translator : \Zend\I18n\Translator\TranslatorInterface