symfony/symfony — pull request #5547 by guilhermeblanco (2012-09-19 05:36:11+00:00)
Title: Implemented tagging support for translation.

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes

Introduced tagging support for translation entries.
The idea behind this patch is to start support for gender specific translations without interfering with current support of Symfony.

Internals: Instead of only adding elements to translation choices without indexing the key, I added a new entry to these choices by considering the key. So, whenever I add a new translation, my transchoice now works not only with integers, but also strings.
Example:

`male: His ideas|female: Her ideas|couple: Their ideas`

Then I could simply do:

```php
$gender = 'female';

$t = $this->get('translator')->transChoice(
'male: His ideas|female: Her ideas|couple: Their ideas',
$gender
);
```