MediaWiki master
LanguageHu.php
Go to the documentation of this file.
1<?php
23
29class LanguageHu extends Language {
30
31 public function convertGrammar( $word, $case ) {
32 $grammarForms = MediaWikiServices::getInstance()->getMainConfig()
33 ->get( MainConfigNames::GrammarForms );
34 if ( isset( $grammarForms[$this->getCode()][$case][$word] ) ) {
35 return $grammarForms[$this->getCode()][$case][$word];
36 }
37
38 switch ( $case ) {
39 case 'rol':
40 return $word . 'ról';
41 case 'ba':
42 return $word . 'ba';
43 case 'k':
44 return $word . 'k';
45 }
46 return '';
47 }
48}
Hungarian localisation for MediaWiki.
convertGrammar( $word, $case)
Grammatical transformations, needed for inflected languages Invoked by putting {{grammar:case|word}} ...
Base class for language-specific code.
Definition Language.php:63
getCode()
Get the internal language code for this language object.
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.