diff options
Diffstat (limited to 'languages/classes/LanguageLa.php')
-rw-r--r-- | languages/classes/LanguageLa.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/languages/classes/LanguageLa.php b/languages/classes/LanguageLa.php new file mode 100644 index 00000000..b9f69925 --- /dev/null +++ b/languages/classes/LanguageLa.php @@ -0,0 +1,37 @@ +<?php +/** Latin (lingua Latina) + * + * @package MediaWiki + * @subpackage Language + */ + +class LanguageLa extends Language { + /** + * Convert from the nominative form of a noun to some other case + * + * Just used in a couple places for sitenames; special-case as necessary. + * Rules are far from complete. + * + * Cases: genitive + */ + function convertGrammar( $word, $case ) { + global $wgGrammarForms; + if ( isset($wgGrammarForms['la'][$case][$word]) ) { + return $wgGrammarForms['la'][$case][$word]; + } + + switch ( $case ) { + case 'genitive': + // 1st and 2nd declension singular only. + $in = array( '/a$/', '/u[ms]$/', '/tio$/' ); + $out = array( 'ae', 'i', 'tionis' ); + return preg_replace( $in, $out, $word ); + default: + return $word; + } + } + +} + + +?> |