From 73e98463d2f67adc604009151c8e9a64da27651d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 12 May 2006 14:55:10 +0000 Subject: [PATCH] * (bug 5905) Plural support for Bosnian localisation (bs) --- RELEASE-NOTES | 1 + languages/LanguageBs.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4a6ff4e23e..864a353ad9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -247,6 +247,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * dumpTextPass can now use 7zip files for prefetch * (bug 5915) Update to Indonesian localisation (id) * (bug 5913) Update for German localisation (de) +* (bug 5905) Plural support for Bosnian localisation (bs) == Compatibility == diff --git a/languages/LanguageBs.php b/languages/LanguageBs.php index fb987093a2..5b318c522f 100644 --- a/languages/LanguageBs.php +++ b/languages/LanguageBs.php @@ -164,6 +164,22 @@ class LanguageBs extends LanguageUtf8 { return array(',' => '.', '.' => ',' ); } + + function convertPlural( $count, $wordform1, $wordform2, $wordform3) { + $count = str_replace ('.', '', $count); + if ($count > 10 && floor(($count % 100) / 10) == 1) { + return $wordform3; + } else { + switch ($count % 10) { + case 1: return $wordform1; + case 2: + case 3: + case 4: return $wordform2; + default: return $wordform3; + } + } + } + # Convert from the nominative form of a noun to some other case # Invoked with {{GRAMMAR:case|word}} function convertGrammar( $word, $case ) { -- 2.20.1