MediaWiki master
LanguageSl.php
Go to the documentation of this file.
1<?php
24
30class LanguageSl extends Language {
31
37 public function convertGrammar( $word, $case ) {
38 $grammarForms =
39 MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
40 if ( isset( $grammarForms['sl'][$case][$word] ) ) {
41 return $grammarForms['sl'][$case][$word];
42 }
43
44 switch ( $case ) {
45 case 'mestnik': # locative
46 $word = 'o ' . $word;
47 break;
48
49 case 'orodnik': # instrumental
50 $word = 'z ' . $word;
51 break;
52 }
53
54 # this will return the original value for 'imenovalnik' (nominativ) and
55 # all undefined case values.
56 return $word;
57 }
58}
Slovenian (Slovenščina)
convertGrammar( $word, $case)
Cases: rodilnik, dajalnik, tožilnik, mestnik, orodnik.
Base class for language-specific code.
Definition Language.php:81
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.