28 lines
708 B
Markdown
28 lines
708 B
Markdown
# Samogitian language (ISO-639-3: sgs) plural forms
|
|
|
|
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
|
|
1 - dual or ending in 2 with exception for 12. Ex. 2 lapo
|
|
2 - other plural. Ex. 25 lapā
|
|
3 - plural for 11-19, 10, 20, 100... Ex. 12 lapu
|
|
Code to test plural forms in Samogitian language. Needed for translation.
|
|
|
|
## Result
|
|
|
|
See result.txt
|