<?php
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\Loader\ArrayLoader;
$translator = new Translator('de_DE');
$translator->addLoader('array', new ArrayLoader());
// German translations
$translator->addResource('array', array(
'budgie' => '{1} Ein Wellensittich|
{2} Zwei Wellensittiche|
[3,19] Viele Wellensittiche|
[20,Inf[ Zu viele Wellensittiche :-o',
), 'de');
echo $translator->trans('budgie', ['%count%' => 1]) . PHP_EOL;
echo $translator->trans('budgie', ['%count%' => 2]) . PHP_EOL;
echo $translator->trans('budgie', ['%count%' => 3]) . PHP_EOL;
echo $translator->trans('budgie', ['%count%' => 19]) . PHP_EOL;
echo $translator->trans('budgie', ['%count%' => 20]) . PHP_EOL;
echo $translator->trans('budgie', ['%count%' => 200]) . PHP_EOL;