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