add main formule

This commit is contained in:
Arnas Udovicius 2021-06-08 19:27:14 +03:00
parent aef7001615
commit 1b3a37df74

View file

@ -5,6 +5,16 @@ Written by Arns Udovič in 2021 <a@arns.lt>
Refs: Refs:
https://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms https://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms
## Main
```
nplurals=4;
plural=(n % 10 == 1 && n % 100 != 11) ? 0
: ((n % 10 == 2 && n % 100 != 12) ? 1
: ((n % 10 >= 3 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) ? 2
: 3));
```
## Logics ## Logics
0 - singular or ending in 1 with exception for 11. Ex., 1 laps 0 - singular or ending in 1 with exception for 11. Ex., 1 laps