MediaWiki REL1_32
LanguageTr.php
Go to the documentation of this file.
1<?php
40class 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 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}
Turkish (Türkçe)
ucfirst( $string)
lcfirst( $string)
Internationalisation code.
Definition Language.php:35
lc( $str, $first=false)
uc( $str, $first=false)
Convert a string to uppercase.