Description
Hi,
if you have ever seen the Facebook translation tool (http://www.facebook.com/?sk=translations), you can get an idea of what I mean:
- The developer passes to the translation function the gender and the number of each variable, the gender and number of the subject and of the user who is seeing the message
- Using the translation tool, the translator is then able to specify (for his/her language) if the translation depends on the gender/number of some variable, on the gender of the subject of the sentence and/or on the gender of the user who is seeing the message.
- When the translator specifies this, the same message is copied (depending on the number of permutations) into several messages and he/she is now able to provide a specifc translation for each case.
To give an example, we have the message
{user} wrote on {friend}'s wall for his birthday
The variable {user} can be a string that can be of any gender/number (in English this doesn't matter for the translation, but in Italian I would translate the verb differently), and depending on {friend}'s gender the message could be adjusted (his birthday/her birthday in English, doesn't matter in Italian).
I'm still thinking of what could be the best strategy to deal with this, but it's clear that this should be done at translation-time because it's very specific for each language in which you are going to translate the message.
One possible implementation is with filters (see https://github.com/ai/r18n).
It's also clear that right now current symfony's translations have a real minimalistic approach and is not even able to deal with messages that depends on more that one variable (Eg. There are {n} apples on {n} trees).
Any suggestion is welcome