MediaWiki  REL1_20
LanguageKaa.php
Go to the documentation of this file.
00001 <?php
00029 class LanguageKaa extends Language {
00030 
00031         # Convert from the nominative form of a noun to some other case
00032         # Invoked with {{GRAMMAR:case|word}}
00033 
00041         function convertGrammar( $word, $case ) {
00042                 global $wgGrammarForms;
00043                 if ( isset( $wgGrammarForms['kaa'][$case][$word] ) ) {
00044                      return $wgGrammarForms['kaa'][$case][$word];
00045                 }
00046                 /* Full code of function convertGrammar() is in development. Updates coming soon. */
00047                 return $word;
00048         }
00049 
00057         function ucfirst ( $string ) {
00058                 if ( substr( $string, 0, 1 ) === 'i' ) {
00059                         return 'İ' . substr( $string, 1 );
00060                 } else {
00061                         return parent::ucfirst( $string );
00062                 }
00063         }
00064 
00072         function lcfirst ( $string ) {
00073                 if ( substr( $string, 0, 1 ) === 'I' ) {
00074                         return 'ı' . substr( $string, 1 );
00075                 } else {
00076                         return parent::lcfirst( $string );
00077                 }
00078         }
00079 
00087         function commafy( $_ ) {
00088                 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
00089                         return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
00090                 } else {
00091                         return $_;
00092                 }
00093         }
00094 
00095 }