From: Meno25 Date: Thu, 11 Jun 2009 14:41:52 +0000 (+0000) Subject: Use the new and more accurate classes for Arabic per X-Git-Tag: 1.31.0-rc.0~41418 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=1541f1b8e064891409bca6c377edf1f856b79485;p=lhc%2Fweb%2Fwiklou.git Use the new and more accurate classes for Arabic per http://ar.wikipedia.org/w/index.php?oldid=3406056 --- diff --git a/languages/classes/LanguageAr.php b/languages/classes/LanguageAr.php index 01c921a073..6315d7163a 100644 --- a/languages/classes/LanguageAr.php +++ b/languages/classes/LanguageAr.php @@ -9,18 +9,20 @@ class LanguageAr extends Language { function convertPlural( $count, $forms ) { if ( !count($forms) ) { return ''; } - $forms = $this->preConvertPlural( $forms, 5 ); + $forms = $this->preConvertPlural( $forms, 6 ); - if ( $count == 1 ) { + if ( $count == 0 ) { $index = 0; - } elseif( $count == 2 ) { + } elseif ( $count == 1 ) { $index = 1; - } elseif( $count < 11 && $count > 2 ) { + } elseif( $count == 2 ) { $index = 2; - } elseif( $count % 100 == 0) { + } elseif( $count % 100 >= 3 && $count % 100 <= 10 ) { $index = 3; - } else { + } elseif( $count % 100 >= 11 && $count % 100 <= 99 ) { $index = 4; + } else { + $index = 5; } return $forms[$index]; }