MediaWiki  1.23.15
LanguageHe.php
Go to the documentation of this file.
1 <?php
30 class LanguageHe extends Language {
31 
43  public function convertGrammar( $word, $case ) {
44  global $wgGrammarForms;
45  if ( isset( $wgGrammarForms['he'][$case][$word] ) ) {
46  return $wgGrammarForms['he'][$case][$word];
47  }
48 
49  switch ( $case ) {
50  case 'prefixed':
51  case 'תחילית':
52  # Duplicate the "Waw" if prefixed, but not if it is already double.
53  if ( substr( $word, 0, 2 ) === "ו" && substr( $word, 0, 4 ) !== "וו" ) {
54  $word = "ו" . $word;
55  }
56 
57  # Remove the "He" article if prefixed.
58  if ( substr( $word, 0, 2 ) === "ה" ) {
59  $word = substr( $word, 2 );
60  }
61 
62  # Add a hyphen (maqaf) before non-Hebrew letters.
63  if ( substr( $word, 0, 2 ) < "א" || substr( $word, 0, 2 ) > "ת" ) {
64  $word = "־" . $word;
65  }
66  }
67 
68  return $word;
69  }
70 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
LanguageHe\convertGrammar
convertGrammar( $word, $case)
Convert grammar forms of words.
Definition: LanguageHe.php:43
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
LanguageHe
Hebrew (עברית)
Definition: LanguageHe.php:30
Language
Internationalisation code.
Definition: Language.php:74