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