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