MediaWiki  1.34.0
LanguageSl.php
Go to the documentation of this file.
1 <?php
29 class LanguageSl extends Language {
30  # Convert from the nominative form of a noun to some other case
31  # Invoked with {{GRAMMAR:case|word}}
32 
40  function convertGrammar( $word, $case ) {
41  global $wgGrammarForms;
42  if ( isset( $wgGrammarForms['sl'][$case][$word] ) ) {
43  return $wgGrammarForms['sl'][$case][$word];
44  }
45 
46  switch ( $case ) {
47  case 'mestnik': # locative
48  $word = 'o ' . $word;
49  break;
50  case 'orodnik': # instrumental
51  $word = 'z ' . $word;
52  break;
53  }
54 
55  # this will return the original value for 'imenovalnik' (nominativ) and
56  # all undefined case values.
57  return $word;
58  }
59 }
LanguageSl\convertGrammar
convertGrammar( $word, $case)
Cases: rodilnik, dajalnik, tožilnik, mestnik, orodnik.
Definition: LanguageSl.php:40
LanguageSl
Slovenian (Slovenščina)
Definition: LanguageSl.php:29
$wgGrammarForms
$wgGrammarForms
Some languages need different word forms, usually for different cases.
Definition: DefaultSettings.php:2965
Language
Internationalisation code.
Definition: Language.php:37