diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 20:21:25 +0000 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 20:21:25 +0000 |
commit | d81f562b712f2387fa02290bf2ca86392ab356f2 (patch) | |
tree | d666cdefbe6ac320827a2c6cb473581b46e22c4c /languages/classes/LanguageRmy.php | |
parent | 183851b06bd6c52f3cae5375f433da720d410447 (diff) |
Aktualisierung auf Version 1.8.1
Diffstat (limited to 'languages/classes/LanguageRmy.php')
-rw-r--r-- | languages/classes/LanguageRmy.php | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/languages/classes/LanguageRmy.php b/languages/classes/LanguageRmy.php new file mode 100644 index 00000000..bbf22d52 --- /dev/null +++ b/languages/classes/LanguageRmy.php @@ -0,0 +1,72 @@ +<?php + +class LanguageRmy extends Language { + /** + * Convert from the nominative form of a noun to some other case + * Invoked with {{GRAMMAR:case|word}} + * + * Cases: nominative, genitive-m-sg, genitive-f-sg, dative, locative, ablative, instrumental + */ + public function convertGrammar( $word, $case ) { + global $wgGrammarForms; + if ( isset($wgGrammarForms['rmy'][$case][$word]) ) { + return $wgGrammarForms['rmy'][$case][$word]; + } + + switch ( $case ) { + case 'genitive-m-sg': # genitive (m.sg.) + if ( $word == 'Vikipidiya' ) { + $word = 'Vikipidiyako'; + } elseif ( $word == 'Vikcyonaro' ) { + $word = 'Vikcyonaresko'; + } + break; + case 'genitive-f-sg': # genitive (f.sg.) + if ( $word == 'Vikipidiya' ) { + $word = 'Vikipidiyaki'; + } elseif ( $word == 'Vikcyonaro' ) { + $word = 'Vikcyonareski'; + } + break; + case 'genitive-pl': # genitive (pl.) + if ( $word == 'Vikipidiya' ) { + $word = 'Vikipidiyake'; + } elseif ( $word == 'Vikcyonaro' ) { + $word = 'Vikcyonareske'; + } + break; + case 'dativ': + if ( $word == 'Vikipidiyake' ) { + $word = 'Wikipediji'; + } elseif ( $word == 'Vikcyonaro' ) { + $word = 'Vikcyonareske'; + } + break; + case 'locative': + if ( $word == 'Vikipidiyate' ) { + $word = 'Wikipedijo'; + } elseif ( $word == 'Vikcyonaro' ) { + $word = 'Vikcyonareste'; + } + break; + case 'ablative': + if ( $word == 'Vikipidiyatar' ) { + $word = 'o Wikipediji'; + } elseif ( $word == 'Vikcyonaro' ) { + $word = 'Vikcyonarestar'; + } + break; + case 'instrumental': + if ( $word == 'Vikipidiyasa' ) { + $word = 'z Wikipedijo'; + } elseif ( $word == 'Vikcyonaro' ) { + $word = 'Vikcyonaresa'; + } + break; + } + + return $word; # this will return the original value for 'nominative' and all undefined case values + } +} + +?> |