Implements \Symfony\Component\Translation\TranslatorInterface::transChoice().
Overrides TranslatorInterface::transChoice
public function transChoice($id, $number, array $parameters = array(), $domain = NULL, $locale = NULL) {
// Violation messages can separated singular and plural versions by "|".
$ids = explode('|', $id);
if (!isset($ids[1])) {
throw new \InvalidArgumentException(sprintf('The message "%s" cannot be pluralized, because it is missing a plural (e.g. "There is one apple|There are @count apples").', $id));
}
return format_plural($number, $ids[0], $ids[1], $this
->processParameters($parameters), $this
->getOptions($domain, $locale));
}