6 * Turkish has two different i, one with a dot and another without a dot. They
7 * are totally different letters in this language, so we have to override the
8 * ucfirst and lcfirst methods.
9 * See http://en.wikipedia.org/wiki/Dotted_and_dotless_I
13 class LanguageTr
extends Language
{
16 * @param $string string
19 function ucfirst ( $string ) {
20 if ( !empty( $string ) && $string[0] == 'i' ) {
21 return 'İ' . substr( $string, 1 );
23 return parent
::ucfirst( $string );
28 * @param $string string
29 * @return mixed|string
31 function lcfirst ( $string ) {
32 if ( !empty( $string ) && $string[0] == 'I' ) {
33 return 'ı' . substr( $string, 1 );
35 return parent
::lcfirst( $string );
42 * @param $string string
43 * @param $first string|bool
47 function uc( $string, $first = false ) {
48 $string = preg_replace( '/i/', 'İ', $string );
49 return parent
::uc( $string, $first );
55 * @param $string string
56 * @param $first string|bool
60 function lc( $string, $first = false ) {
61 $string = preg_replace( '/I/', 'ı', $string );
62 return parent
::lc( $string, $first );