Symfony2's Translator only supports the ISO 31-11 notation. That format doesn't have the *
wildchart you are using. What you are trying to do is not possible with Symfony2 at te moment.
However, you can extend Symfony's Translator and add this functionality. You can do that by overriding the Symfony\Component\Translation\MessageSelector
class, adding the functionality and then change the service parameter translator.selector.class
to your class name. For instance:
// src/Acme/TranslationExtraBundle/Translation/MessageSelector.php
namespace Acme\TranslationExtraBundle\Translation;
use Symfony\Component\Translation\MessageSelector as BaseMessageSelector;
class MessageSelector extends BaseMessageSelector
{
public function choose($message, $number, $locale)
{
// ... your special logic
return parent::choose($message, $number, $locale);
}
}
parameters:
translator.selector.class: Acme\TranslationExtraBundle\Translation\MessageSelector