add main formule
This commit is contained in:
parent
aef7001615
commit
1b3a37df74
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -5,6 +5,16 @@ Written by Arns Udovič in 2021 <a@arns.lt>
|
|||
Refs:
|
||||
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
|
||||
|
||||
0 - singular or ending in 1 with exception for 11. Ex., 1 laps
|
||||
|
|
Loading…
Reference in a new issue