7 class LanguageBs
extends Language
{
9 function convertPlural( $count, $forms ) {
10 if ( !count($forms) ) { return ''; }
11 $forms = $this->preConvertPlural( $forms, 3 );
13 // FIXME: CLDR defines 4 plural forms instead of 3. Plural for decimals is missing.
14 // http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
15 if ($count > 10 && floor(($count %
100) / 10) == 1) {
18 switch ($count %
10) {
19 case 1: return $forms[0];
22 case 4: return $forms[1];
23 default: return $forms[2];
28 # Convert from the nominative form of a noun to some other case
29 # Invoked with {{GRAMMAR:case|word}}
31 * Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ
33 function convertGrammar( $word, $case ) {
34 global $wgGrammarForms;
35 if ( isset($wgGrammarForms['bs'][$case][$word]) ) {
36 return $wgGrammarForms['bs'][$case][$word];
39 case 'instrumental': # instrumental
42 case 'lokativ': # locative
47 return $word; # this will return the original value for 'nominativ' (nominative) and all undefined case values