MediaWiki master
LanguageHsb.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Languages;
8
12
18class LanguageHsb extends Language {
19
21 public function convertGrammar( $word, $case ) {
22 $grammarForms =
24 if ( isset( $grammarForms['hsb'][$case][$word] ) ) {
25 return $grammarForms['hsb'][$case][$word];
26 }
27
28 switch ( $case ) {
29 case 'instrumental': # instrumental
30 $word = 'z ' . $word;
31 break;
32 case 'lokatiw': # lokatiw
33 $word = 'wo ' . $word;
34 break;
35 }
36
37 # this will return the original value for 'nominatiw' (nominativ) and
38 # all undefined case values.
39 return $word;
40 }
41}
42
44class_alias( LanguageHsb::class, 'LanguageHsb' );
Base class for language-specific code.
Definition Language.php:69
Upper Sorbian (Hornjoserbsce)
convertGrammar( $word, $case)
Grammatical transformations, needed for inflected languages Invoked by putting {{grammar:case|word}} ...
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.