MediaWiki  1.23.2
LanguageCu.php
Go to the documentation of this file.
1 <?php
29 class LanguageCu extends Language {
30 
39  function convertGrammar( $word, $case ) {
40  global $wgGrammarForms;
41  if ( isset( $wgGrammarForms['сu'][$case][$word] ) ) {
42  return $wgGrammarForms['сu'][$case][$word];
43  }
44 
45  # These rules are not perfect, but they are currently only used for site names so it doesn't
46  # matter if they are wrong sometimes. Just add a special case for your site name if necessary.
47 
48  # join and array_slice instead mb_substr
49  $ar = array();
50  preg_match_all( '/./us', $word, $ar );
51  if ( !preg_match( "/[a-zA-Z_]/us", $word ) ) {
52  switch ( $case ) {
53  case 'genitive': # родительный падеж
54  if ( ( join( '', array_slice( $ar[0], -4 ) ) == 'вики' ) || ( join( '', array_slice( $ar[0], -4 ) ) == 'Вики' ) ) {
55  } elseif ( join( '', array_slice( $ar[0], -2 ) ) == 'ї' ) {
56  $word = join( '', array_slice( $ar[0], 0, -2 ) ) . 'їѩ';
57  }
58  break;
59  case 'accusative': # винительный падеж
60  # stub
61  break;
62  }
63  }
64  return $word;
65  }
66 }
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
LanguageCu
Old Church Slavonic (Ѩзыкъ словѣньскъ)
Definition: LanguageCu.php:29
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
LanguageCu\convertGrammar
convertGrammar( $word, $case)
Convert from the nominative form of a noun to some other case Invoked with {{grammar:case|word}}.
Definition: LanguageCu.php:39
Language
Internationalisation code.
Definition: Language.php:74