Ability to give more than two replacements for plural

8 years ago
7 years ago


I'm preparing Russian localization for Traq.

The thing is that Russian plural formation is more complex than in most other languages: we have three forms of nouns.

The expression is as follows (in PHP):

    $word = $number % 10 === 1 && $number % 100 !== 11 ? $form0 : ($number % 10 >= 2 && $number % 10 <= 4 && ($number % 100 < 10 || $number % 100 >= 20) ? $form1 : $form2);

So, I would like to have an opportunity to give three forms in the localization file, not two.

The problem is that I don't know how to tell Traq that this should be done only if the locale is set to Russian.

If you give me a hint how to do this, I'll implement it myself.


Ticket History

8 years and 6 months ago by Menelion Elensúlë

Oh sorry, the formatting is messed up for some reason :-(.

8 years and 6 months ago by Jack

  • Closed ticket as Invalid

This functionality is already possible in Traq, but with the documentation still being worked on, the only place to find it was in the code itself.

However I've gone ahead and extended the documentation for Localisation, that should help you.