From: Niklas Laxström Date: Wed, 7 Jun 2006 19:58:45 +0000 (+0000) Subject: * (bug 5981) Add plural function Slovenian (sl) X-Git-Tag: 1.31.0-rc.0~56845 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=7e985de2def1db6161bb9243b617b2fece1b1a0f;p=lhc%2Fweb%2Fwiklou.git * (bug 5981) Add plural function Slovenian (sl) --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1a130c3db2..093af87692 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -458,7 +458,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN edit with 'preview on first edit' enabled. * (bug 6230) Regression fix: in [URL link text] * Added AutoLoader.php, which loads classes without need of require_once() - +* (bug 5981) Add plural function Slovenian (sl) == Compatibility == diff --git a/languages/LanguageSl.php b/languages/LanguageSl.php index 9795d69f8f..e3b328b752 100644 --- a/languages/LanguageSl.php +++ b/languages/LanguageSl.php @@ -190,5 +190,23 @@ class LanguageSl extends LanguageUtf8 { return $word; # this will return the original value for 'imenovalnik' (nominativ) and all undefined case values } + function convertPlural( $count, $w1, $w2, $w3, $w4, $w5) { + $count = str_replace ('.', '', $count); + $forms = array( $w1, $w2, $w3, $w4, $w5 ); + if ( $count % 100 === 1 ) { + $index = 0; + } elseif ( $count % 100 === 2 ) { + $index = 1; + } elseif ( $count%100==3 || $count%100==4 ) { + $index = 2; + } elseif ( $count != 0 ) { + $index = 3; + } else { + $index = 4; + } + return $forms[$index]; + } + + } ?> \ No newline at end of file