7 class LanguageBs
extends Language
{
9 function convertPlural( $count, $forms ) {
10 if ( !count($forms) ) { return ''; }
11 $forms = $this->preConvertPlural( $forms, 3 );
13 if ($count > 10 && floor(($count %
100) / 10) == 1) {
16 switch ($count %
10) {
17 case 1: return $forms[0];
20 case 4: return $forms[1];
21 default: return $forms[2];
26 # Convert from the nominative form of a noun to some other case
27 # Invoked with {{GRAMMAR:case|word}}
29 * Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ
31 function convertGrammar( $word, $case ) {
32 global $wgGrammarForms;
33 if ( isset($wgGrammarForms['bs'][$case][$word]) ) {
34 return $wgGrammarForms['bs'][$case][$word];
37 case 'instrumental': # instrumental
40 case 'lokativ': # locative
45 return $word; # this will return the original value for 'nominativ' (nominative) and all undefined case values