MediaWiki  master
LanguageTr.php
Go to the documentation of this file.
1 <?php
38 class LanguageTr extends Language {
39 
40  private $uc = [ 'I', 'İ' ];
41  private $lc = [ 'ı', 'i' ];
42 
47  public function ucfirst( $string ) {
48  $first = mb_substr( $string, 0, 1 );
49  if ( in_array( $first, $this->lc ) ) {
50  $first = str_replace( $this->lc, $this->uc, $first );
51  return $first . mb_substr( $string, 1 );
52  }
53  return parent::ucfirst( $string );
54  }
55 
60  public function lcfirst( $string ) {
61  $first = mb_substr( $string, 0, 1 );
62  if ( in_array( $first, $this->uc ) ) {
63  $first = str_replace( $this->uc, $this->lc, $first );
64  return $first . mb_substr( $string, 1 );
65  }
66  return parent::lcfirst( $string );
67  }
68 
69 }
Turkish (Türkçe)
Definition: LanguageTr.php:38
ucfirst( $string)
Definition: LanguageTr.php:47
lcfirst( $string)
Definition: LanguageTr.php:60
Base class for language-specific code.
Definition: Language.php:54
lc( $str, $first=false)
Definition: Language.php:2729
uc( $str, $first=false)
Definition: Language.php:2694