MediaWiki REL1_32
LanguageBs.php
Go to the documentation of this file.
1<?php
29class LanguageBs extends Language {
41 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.
Definition Language.php:35