class TranslatorHelper extends Helper (View source)

TranslatorHelper.

Properties

protected $translator

Methods

__construct(Translator $translator)

No description

string
getName()

No description

string
trans(string $id, array $parameters = [], null $domain = null, null $locale = null)

Translates the given message.

string
transChoice(string $id, int $number, array $parameters = [], null $domain = null, null $locale = null)

Translates the given message.

Details

__construct(Translator $translator)

Parameters

Translator $translator

string getName()

Return Value

string

string trans(string $id, array $parameters = [], null $domain = null, null $locale = null)

Translates the given message.

Wraps the Translator trans method.

Parameters

string $id
array $parameters
null $domain
null $locale

Return Value

string

string transChoice(string $id, int $number, array $parameters = [], null $domain = null, null $locale = null)

Translates the given message.

Wraps the Translator transChoice method.

Parameters

string $id
int $number
array $parameters
null $domain
null $locale

Return Value

string