MediaWiki  master
LanguageTr.php
Go to the documentation of this file.
1 <?php
40 class LanguageTr extends Language {
41 
42  private $uc = [ 'I', 'İ' ];
43  private $lc = [ 'ı', 'i' ];
44 
49  public function ucfirst( $string ) {
50  $first = mb_substr( $string, 0, 1 );
51  if ( in_array( $first, $this->lc ) ) {
52  $first = str_replace( $this->lc, $this->uc, $first );
53  return $first . mb_substr( $string, 1 );
54  }
55  return parent::ucfirst( $string );
56  }
57 
62  public function lcfirst( $string ) {
63  $first = mb_substr( $string, 0, 1 );
64  if ( in_array( $first, $this->uc ) ) {
65  $first = str_replace( $this->uc, $this->lc, $first );
66  return $first . mb_substr( $string, 1 );
67  }
68  return parent::lcfirst( $string );
69  }
70 
71 }
Language\lc
lc( $str, $first=false)
Definition: Language.php:2690
LanguageTr
Turkish (Türkçe)
Definition: LanguageTr.php:40
LanguageTr\$uc
$uc
Definition: LanguageTr.php:42
LanguageTr\$lc
$lc
Definition: LanguageTr.php:43
LanguageTr\lcfirst
lcfirst( $string)
Definition: LanguageTr.php:62
LanguageTr\ucfirst
ucfirst( $string)
Definition: LanguageTr.php:49
Language\uc
uc( $str, $first=false)
Definition: Language.php:2636
Language
Internationalisation code.
Definition: Language.php:39