3 /** Karakalpak (Qaraqalpaqsha)
7 class LanguageKaa
extends Language
{
9 # Convert from the nominative form of a noun to some other case
10 # Invoked with {{GRAMMAR:case|word}}
12 * Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms
19 function convertGrammar( $word, $case ) {
20 global $wgGrammarForms;
21 if ( isset( $wgGrammarForms['kaa'][$case][$word] ) ) {
22 return $wgGrammarForms['kaa'][$case][$word];
24 /* Full code of function convertGrammar() is in development. Updates coming soon. */
29 * It fixes issue with ucfirst for transforming 'i' to 'İ'
31 * @param $string string
35 function ucfirst ( $string ) {
36 if ( substr( $string, 0, 1 ) === 'i' ) {
37 return 'İ' . substr( $string, 1 );
39 return parent
::ucfirst( $string );
44 * It fixes issue with lcfirst for transforming 'I' to 'ı'
46 * @param $string string
50 function lcfirst ( $string ) {
51 if ( substr( $string, 0, 1 ) === 'I' ) {
52 return 'ı' . substr( $string, 1 );
54 return parent
::lcfirst( $string );
59 * Avoid grouping whole numbers between 0 to 9999
65 function commafy( $_ ) {
66 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
67 return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );