summaryrefslogtreecommitdiff
path: root/languages/classes/LanguageMo.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
commit222b01f5169f1c7e69762e0e8904c24f78f71882 (patch)
tree8e932e12546bb991357ec48eb1638d1770be7a35 /languages/classes/LanguageMo.php
parent00ab76a6b686e98a914afc1975812d2b1aaa7016 (diff)
update to MediaWiki 1.16.0
Diffstat (limited to 'languages/classes/LanguageMo.php')
-rw-r--r--languages/classes/LanguageMo.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/languages/classes/LanguageMo.php b/languages/classes/LanguageMo.php
new file mode 100644
index 00000000..83cfafb8
--- /dev/null
+++ b/languages/classes/LanguageMo.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ *
+ * @ingroup Language
+ */
+class LanguageMo extends Language {
+ function convertPlural( $count, $forms ) {
+ // Plural rules per
+ // http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#mo
+ if ( !count($forms) ) { return ''; }
+
+ $forms = $this->preConvertPlural( $forms, 3 );
+
+ if ( $count == 1 ) {
+ $index = 0;
+ } elseif ( $count == 0 || $count % 100 < 20 ) {
+ $index = 1;
+ } else {
+ $index = 2;
+ }
+ return $forms[$index];
+ }
+}