2 /** Karakalpak (Qaraqalpaqsha)
8 class LanguageKaa
extends Language
{
10 # Convert from the nominative form of a noun to some other case
11 # Invoked with {{GRAMMAR:case|word}}
13 * Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms
15 function convertGrammar( $word, $case ) {
16 global $wgGrammarForms;
17 if ( isset( $wgGrammarForms['kaa'][$case][$word] ) ) {
18 return $wgGrammarForms['kaa'][$case][$word];
20 /* Full code of function convertGrammar() is in development. Updates coming soon. */
24 function ucfirst ( $string ) {
25 if ( $string[0] == 'i' ) {
26 return 'İ' . substr( $string, 1 );
28 return parent
::ucfirst( $string );
33 * Avoid grouping whole numbers between 0 to 9999
35 function commafy( $_ ) {
36 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
37 return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev($_) ) );