Index: trunk/phase3/languages/classes/LanguageAr.php |
— | — | @@ -9,18 +9,20 @@ |
10 | 10 | |
11 | 11 | function convertPlural( $count, $forms ) { |
12 | 12 | if ( !count($forms) ) { return ''; } |
13 | | - $forms = $this->preConvertPlural( $forms, 5 ); |
| 13 | + $forms = $this->preConvertPlural( $forms, 6 ); |
14 | 14 | |
15 | | - if ( $count == 1 ) { |
| 15 | + if ( $count == 0 ) { |
16 | 16 | $index = 0; |
| 17 | + } elseif ( $count == 1 ) { |
| 18 | + $index = 1; |
17 | 19 | } elseif( $count == 2 ) { |
18 | | - $index = 1; |
19 | | - } elseif( $count < 11 && $count > 2 ) { |
20 | 20 | $index = 2; |
21 | | - } elseif( $count % 100 == 0) { |
| 21 | + } elseif( $count % 100 >= 3 && $count % 100 <= 10 ) { |
22 | 22 | $index = 3; |
| 23 | + } elseif( $count % 100 >= 11 && $count % 100 <= 99 ) { |
| 24 | + $index = 4; |
23 | 25 | } else { |
24 | | - $index = 4; |
| 26 | + $index = 5; |
25 | 27 | } |
26 | 28 | return $forms[$index]; |
27 | 29 | } |