# Invoked by putting {{grammar:case|word}} in a message
function convertGrammar( $word, $case ) {
global $wgGrammarForms;
- if ( isset($wgGrammarForms[$case][$word]) ) {
- return $wgGrammarForms[$case][$word];
+ if ( isset($wgGrammarForms['cs'][$case][$word]) ) {
+ return $wgGrammarForms['cs'][$case][$word];
}
# allowed values for $case:
# 1sg, 2sg, ..., 7sg -- nominative, genitive, ... (in singular)
# unknown
return $word;
}
+
+ # Plural form transformations, needed for some languages.
+ # Invoked by {{plural:count|wordform1|wordform2|wordform3}}
+ function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+ switch ( $count ) {
+ case 1:
+ return $wordform1;
+
+ case 2:
+ case 3:
+ case 4:
+ return $wordform2;
+
+ default:
+ return $wordform3;
+ };
+ }
}
?>