public function TranslatorInterface::transChoice

Translates the given choice message by choosing a translation according to a number.

@api

Parameters

string $id The message id (may also be an object that can be cast to string):

integer $number The number to use to find the indice of the message:

array $parameters An array of parameters for the message:

string $domain The domain for the message:

string $locale The locale:

Return value

string The translated string

2 methods override TranslatorInterface::transChoice()
DefaultTranslator::transChoice in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/DefaultTranslator.php
Interpolates the given choice message by choosing a variant according to a number.
DrupalTranslator::transChoice in drupal/core/lib/Drupal/Core/Validation/DrupalTranslator.php
Implements \Symfony\Component\Translation\TranslatorInterface::transChoice().

File

drupal/core/vendor/symfony/translation/Symfony/Component/Translation/TranslatorInterface.php, line 50

Class

TranslatorInterface
TranslatorInterface.

Namespace

Symfony\Component\Translation

Code

public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null);