plural rules and documenting newly added languages

This commit is contained in:
El RIDO 2021-01-07 21:16:03 +01:00
parent ad4184dbe3
commit b38ebc503e
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
6 changed files with 15 additions and 4 deletions

View file

@ -321,6 +321,10 @@ class I18n
case 'oc':
case 'zh':
return $n > 1 ? 1 : 0;
case 'he':
return $n === 1 ? 0 : ($n === 2 ? 1 : (($n < 0 || $n > 10) && ($n % 10 === 0) ? 2 : 3));
case 'lt':
return $n % 10 === 1 && $n % 100 !== 11 ? 0 : (($n % 10 >= 2 && $n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
case 'pl':
return $n == 1 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
case 'ru':