added ru plural formula
This commit is contained in:
parent
6ff5caf758
commit
ccba2f029f
1 changed files with 2 additions and 0 deletions
|
@ -299,6 +299,8 @@ class I18n
|
||||||
return $n > 1 ? 1 : 0;
|
return $n > 1 ? 1 : 0;
|
||||||
case 'pl':
|
case 'pl':
|
||||||
return $n == 1 ? 0 : $n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2;
|
return $n == 1 ? 0 : $n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2;
|
||||||
|
case 'ru':
|
||||||
|
return $n % 10==1 && $n % 100 != 11 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
|
||||||
// en, de
|
// en, de
|
||||||
default:
|
default:
|
||||||
return $n != 1 ? 1 : 0;
|
return $n != 1 ? 1 : 0;
|
||||||
|
|
Loading…
Reference in a new issue