Localisation updates for core messages from translatewiki.net (2009-04-08 17:57 UTC)
[lhc/web/wiklou.git] / languages / classes / LanguageBs.php
1 <?php
2
3 /** Bosnian (bosanski)
4 *
5 * @ingroup Language
6 */
7 class LanguageBs extends Language {
8
9 function convertPlural( $count, $forms ) {
10 if ( !count($forms) ) { return ''; }
11 $forms = $this->preConvertPlural( $forms, 3 );
12
13 if ($count > 10 && floor(($count % 100) / 10) == 1) {
14 return $forms[2];
15 } else {
16 switch ($count % 10) {
17 case 1: return $forms[0];
18 case 2:
19 case 3:
20 case 4: return $forms[1];
21 default: return $forms[2];
22 }
23 }
24 }
25
26 # Convert from the nominative form of a noun to some other case
27 # Invoked with {{GRAMMAR:case|word}}
28 /**
29 * Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ
30 */
31 function convertGrammar( $word, $case ) {
32 global $wgGrammarForms;
33 if ( isset($wgGrammarForms['bs'][$case][$word]) ) {
34 return $wgGrammarForms['bs'][$case][$word];
35 }
36 switch ( $case ) {
37 case 'instrumental': # instrumental
38 $word = 's ' . $word;
39 break;
40 case 'lokativ': # locative
41 $word = 'o ' . $word;
42 break;
43 }
44
45 return $word; # this will return the original value for 'nominativ' (nominative) and all undefined case values
46 }
47 }