bug 28040 Turkish: properly lower case 'I' to 'ı' (dotless i)
[lhc/web/wiklou.git] / languages / classes / LanguageTr.php
1 <?php
2
3 /**
4 * Turkish (Türkçe)
5 *
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
10 * and @bug 28040
11 * @ingroup Language
12 */
13 class LanguageTr extends Language {
14
15 function ucfirst ( $string ) {
16 if ( !empty( $string ) && $string[0] == 'i' ) {
17 return 'İ' . substr( $string, 1 );
18 } else {
19 return parent::ucfirst( $string );
20 }
21 }
22
23 function lcfirst ( $string ) {
24 if ( !empty( $string ) && $string[0] == 'I' ) {
25 return 'ı' . substr( $string, 1 );
26 } else {
27 return parent::lcfirst( $string );
28 }
29 }
30
31 }