31 # Convert from the nominative form of a noun to some other case
32 # Invoked with {{GRAMMAR:case|word}}
58 if ( substr( $string, 0, 1 ) ===
'i' ) {
59 return 'İ' . substr( $string, 1 );
61 return parent::ucfirst( $string );
72 if ( substr( $string, 0, 1 ) ===
'I' ) {
73 return 'ı' . substr( $string, 1 );
75 return parent::lcfirst( $string );
86 if ( !preg_match(
'/^\d{1,4}$/', $_ ) ) {
87 return strrev( (
string)preg_replace(
'/(\d{3})(?=\d)(?!\d*\.)/',
'$1,', strrev( $_ ) ) );
$wgGrammarForms
Some languages need different word forms, usually for different cases.
Karakalpak (Qaraqalpaqsha)
lcfirst( $string)
It fixes issue with lcfirst for transforming 'I' to 'ı'.
convertGrammar( $word, $case)
Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms.
commafy( $_)
Avoid grouping whole numbers between 0 to 9999.
ucfirst( $string)
It fixes issue with ucfirst for transforming 'i' to 'İ'.
Internationalisation code.