MediaWiki  master
LanguageKaa.php
Go to the documentation of this file.
1 <?php
23 
29 class LanguageKaa extends Language {
30 
31  # Convert from the nominative form of a noun to some other case
32  # Invoked with {{GRAMMAR:case|word}}
33 
42  public function convertGrammar( $word, $case ) {
43  $grammarForms =
44  MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
45  if ( isset( $grammarForms['kaa'][$case][$word] ) ) {
46  return $grammarForms['kaa'][$case][$word];
47  }
48  /* Full code of function convertGrammar() is in development. Updates coming soon. */
49  return $word;
50  }
51 
59  public function ucfirst( $string ) {
60  if ( substr( $string, 0, 1 ) === 'i' ) {
61  return 'İ' . substr( $string, 1 );
62  }
63  return parent::ucfirst( $string );
64  }
65 
73  public function lcfirst( $string ) {
74  if ( substr( $string, 0, 1 ) === 'I' ) {
75  return 'ı' . substr( $string, 1 );
76  }
77  return parent::lcfirst( $string );
78  }
79 
80 }
Karakalpak (Qaraqalpaqsha)
Definition: LanguageKaa.php:29
lcfirst( $string)
It fixes issue with lcfirst for transforming 'I' to 'ı'.
Definition: LanguageKaa.php:73
convertGrammar( $word, $case)
Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms.
Definition: LanguageKaa.php:42
ucfirst( $string)
It fixes issue with ucfirst for transforming 'i' to 'İ'.
Definition: LanguageKaa.php:59
Base class for language-specific code.
Definition: Language.php:54
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.