MediaWiki REL1_32
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}}
40 function convertGrammar( $word, $case ) {
41 global $wgGrammarForms;
42 if ( isset( $wgGrammarForms['sl'][$case][$word] ) ) {
43 return $wgGrammarForms['sl'][$case][$word];
44 }
45
46 switch ( $case ) {
47 case 'mestnik': # locative
48 $word = 'o ' . $word;
49 break;
50 case 'orodnik': # instrumental
51 $word = 'z ' . $word;
52 break;
53 }
54
55 # this will return the original value for 'imenovalnik' (nominativ) and
56 # all undefined case values.
57 return $word;
58 }
59}
$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.
Definition Language.php:35