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