* Fix an invalid XHTML (strict) on images
[mediawiki.git] / languages / classes / LanguageRmy.php
blobe6096348f4ec7312e7776d61c30b94f3464ec13d
1 <?php
3 class LanguageRmy extends Language {
4 /**
5 * Convert from the nominative form of a noun to some other case
6 * Invoked with {{GRAMMAR:case|word}}
8 * Cases: nominative, genitive-m-sg, genitive-f-sg, dative, locative, ablative, instrumental
9 */
10 public function convertGrammar( $word, $case ) {
11 global $wgGrammarForms;
12 if ( isset($wgGrammarForms['rmy'][$case][$word]) ) {
13 return $wgGrammarForms['rmy'][$case][$word];
16 switch ( $case ) {
17 case 'genitive-m-sg': # genitive (m.sg.)
18 if ( $word == 'Vikipidiya' ) {
19 $word = 'Vikipidiyako';
20 } elseif ( $word == 'Vikcyonaro' ) {
21 $word = 'Vikcyonaresko';
23 break;
24 case 'genitive-f-sg': # genitive (f.sg.)
25 if ( $word == 'Vikipidiya' ) {
26 $word = 'Vikipidiyaki';
27 } elseif ( $word == 'Vikcyonaro' ) {
28 $word = 'Vikcyonareski';
30 break;
31 case 'genitive-pl': # genitive (pl.)
32 if ( $word == 'Vikipidiya' ) {
33 $word = 'Vikipidiyake';
34 } elseif ( $word == 'Vikcyonaro' ) {
35 $word = 'Vikcyonareske';
37 break;
38 case 'dativ':
39 if ( $word == 'Vikipidiyake' ) {
40 $word = 'Wikipediji';
41 } elseif ( $word == 'Vikcyonaro' ) {
42 $word = 'Vikcyonareske';
44 break;
45 case 'locative':
46 if ( $word == 'Vikipidiyate' ) {
47 $word = 'Wikipedijo';
48 } elseif ( $word == 'Vikcyonaro' ) {
49 $word = 'Vikcyonareste';
51 break;
52 case 'ablative':
53 if ( $word == 'Vikipidiyatar' ) {
54 $word = 'o Wikipediji';
55 } elseif ( $word == 'Vikcyonaro' ) {
56 $word = 'Vikcyonarestar';
58 break;
59 case 'instrumental':
60 if ( $word == 'Vikipidiyasa' ) {
61 $word = 'z Wikipedijo';
62 } elseif ( $word == 'Vikcyonaro' ) {
63 $word = 'Vikcyonaresa';
65 break;
68 return $word; # this will return the original value for 'nominative' and all undefined case values