How to handle plural variants of a string
Some of our strings need to show a number with text describing that number. An example would be "There are 3
cards in this list". In English, we would need two variants of that string. When the number was 1, we would
use "card" in that sentence, and when it was any other number, we would use "cards".
Other languages may need more or fewer variants than that.
To solve this problem there is a standard called CLDR that makes rules for every language that describe how pluralization
is handled. Trello follows these rules for strings that use plurals. Here is what you need to do:
- If the note on a string says that it is a pluralization variant, take note of which variant it is.
It will be one of "zero", "one", "two", "few", "many", or "other".
- Go to the CLDR
Pluralization Rules webpage and look up the language you are translating to.
- For your language, you will see the list of variants that you need to translate. For example, if you look
on that page you'll see that it uses all six variants. Also read the rules for when each variant
- In your translation application, provide a translation for each variant your language uses. Ensure that
it follows the rules on the CLDR site. If you don't agree with the rules, please follow them anyway, and
do your best to provide a translation.