MediaWiki  REL1_19
LanguageKaa.php
Go to the documentation of this file.
00001 <?php
00002 
00007 class LanguageKaa extends Language {
00008 
00009         # Convert from the nominative form of a noun to some other case
00010         # Invoked with {{GRAMMAR:case|word}}
00011 
00019         function convertGrammar( $word, $case ) {
00020                 global $wgGrammarForms;
00021                 if ( isset( $wgGrammarForms['kaa'][$case][$word] ) ) {
00022                      return $wgGrammarForms['kaa'][$case][$word];
00023                 }
00024                 /* Full code of function convertGrammar() is in development. Updates coming soon. */
00025                 return $word;
00026         }
00027 
00035         function ucfirst ( $string ) {
00036                 if ( substr( $string, 0, 1 ) === 'i' ) {
00037                         return 'İ' . substr( $string, 1 );
00038                 } else {
00039                         return parent::ucfirst( $string );
00040                 }
00041         }
00042 
00050         function lcfirst ( $string ) {
00051                 if ( substr( $string, 0, 1 ) === 'I' ) {
00052                         return 'ı' . substr( $string, 1 );
00053                 } else {
00054                         return parent::lcfirst( $string );
00055                 }
00056         }
00057 
00065         function commafy( $_ ) {
00066                 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
00067                         return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
00068                 } else {
00069                         return $_;
00070                 }
00071         }
00072 
00073 }