Expand a few comments. One as per Nikerabbit's comment on r59695.
[mediawiki.git] / languages / classes / LanguageBe.php
blobc9ae0fcdf271e50f2fcd7592aaa2fdfee7b67248
1 <?php
2 /** Belarusian normative (Беларуская мова)
4 * This is still the version from Be-x-old, only duplicated for consistency of
5 * plural and grammar functions. If there are errors please send a patch.
7 * @ingroup Language
9 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
10 * @bug 1638, 2135
11 * @link http://be.wikipedia.org/wiki/Talk:LanguageBe.php
12 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
13 * @license http://www.gnu.org/copyleft/fdl.html GNU Free Documentation License
16 class LanguageBe extends Language {
18 function convertPlural( $count, $forms ) {
19 if ( !count($forms) ) { return ''; }
20 // FIXME: CLDR defines 4 plural forms instead of 3
21 // http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
22 $forms = $this->preConvertPlural( $forms, 3 );
24 if ($count > 10 && floor(($count % 100) / 10) == 1) {
25 return $forms[2];
26 } else {
27 switch ($count % 10) {
28 case 1: return $forms[0];
29 case 2:
30 case 3:
31 case 4: return $forms[1];
32 default: return $forms[2];