MediaWiki REL1_35
LanguageBs.php
Go to the documentation of this file.
1<?php
29class LanguageBs extends Language {
41 public function convertGrammar( $word, $case ) {
42 global $wgGrammarForms;
43 if ( isset( $wgGrammarForms['bs'][$case][$word] ) ) {
44 return $wgGrammarForms['bs'][$case][$word];
45 }
46 switch ( $case ) {
47 case 'instrumental': # instrumental
48 $word = 's ' . $word;
49 break;
50 case 'lokativ': # locative
51 $word = 'o ' . $word;
52 break;
53 }
54
55 # this will return the original value for 'nominativ' (nominative)
56 # and all undefined case values.
57 return $word;
58 }
59}
$wgGrammarForms
Some languages need different word forms, usually for different cases.
Bosnian (bosanski)
convertGrammar( $word, $case)
Convert from the nominative form of a noun to some other case Invoked with {{GRAMMAR:case|word}}.
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
Definition Language.php:41