MediaWiki master
LanguageSl.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Languages;
8
12
18class LanguageSl extends Language {
19
25 public function convertGrammar( $word, $case ) {
26 $grammarForms =
28 if ( isset( $grammarForms['sl'][$case][$word] ) ) {
29 return $grammarForms['sl'][$case][$word];
30 }
31
32 switch ( $case ) {
33 case 'mestnik': # locative
34 $word = 'o ' . $word;
35 break;
36
37 case 'orodnik': # instrumental
38 $word = 'z ' . $word;
39 break;
40 }
41
42 # this will return the original value for 'imenovalnik' (nominativ) and
43 # all undefined case values.
44 return $word;
45 }
46}
47
49class_alias( LanguageSl::class, 'LanguageSl' );
Base class for language-specific code.
Definition Language.php:69
Slovenian (Slovenščina)
convertGrammar( $word, $case)
Cases: rodilnik, dajalnik, tožilnik, mestnik, orodnik.
A class containing constants representing the names of configuration variables.
const GrammarForms
Name constant for the GrammarForms setting, for use with Config::get()
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.