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