MediaWiki master
LanguageHu.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Languages;
8
12
18class LanguageHu extends Language {
19
21 public function convertGrammar( $word, $case ) {
22 $grammarForms = MediaWikiServices::getInstance()->getMainConfig()
24 if ( isset( $grammarForms[$this->getCode()][$case][$word] ) ) {
25 return $grammarForms[$this->getCode()][$case][$word];
26 }
27
28 switch ( $case ) {
29 case 'rol':
30 return $word . 'ról';
31 case 'ba':
32 return $word . 'ba';
33 case 'k':
34 return $word . 'k';
35 }
36 return '';
37 }
38}
39
41class_alias( LanguageHu::class, 'LanguageHu' );
Base class for language-specific code.
Definition Language.php:68
getCode()
Get the internal language code for this language object.
Hungarian localisation for MediaWiki.
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.