MediaWiki REL1_41
LanguageTr.php
Go to the documentation of this file.
1<?php
38class LanguageTr extends Language {
39
40 private const UC = [ 'I', 'İ' ];
41 private const LC = [ 'ı', 'i' ];
42
43 public function ucfirst( $str ) {
44 $first = mb_substr( $str, 0, 1 );
45 if ( in_array( $first, self::LC ) ) {
46 $first = str_replace( self::LC, self::UC, $first );
47 return $first . mb_substr( $str, 1 );
48 }
49 return parent::ucfirst( $str );
50 }
51
52 public function lcfirst( $str ) {
53 $first = mb_substr( $str, 0, 1 );
54 if ( in_array( $first, self::UC ) ) {
55 $first = str_replace( self::UC, self::LC, $first );
56 return $first . mb_substr( $str, 1 );
57 }
58 return parent::lcfirst( $str );
59 }
60
61}
Turkish (Türkçe)
ucfirst( $str)
lcfirst( $str)
Base class for language-specific code.
Definition Language.php:63