3 /** Latin (lingua Latina)
7 class LanguageLa
extends Language
{
9 * Convert from the nominative form of a noun to some other case
11 * Just used in a couple places for sitenames; special-case as necessary.
12 * Rules are far from complete.
14 * Cases: genitive, accusative, ablative
21 function convertGrammar( $word, $case ) {
22 global $wgGrammarForms;
23 if ( isset( $wgGrammarForms['la'][$case][$word] ) ) {
24 return $wgGrammarForms['la'][$case][$word];
29 // only a few declensions, and even for those mostly the singular only
30 $in = array( '/u[ms]$/', # 2nd declension singular
31 '/ommunia$/', # 3rd declension neuter plural (partly)
32 '/a$/', # 1st declension singular
33 '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
34 '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
35 '/es$/' # 5th declension singular
40 'librorum', 'nuntiorum',
41 'tionis', 'ntis', 'atis',
44 return preg_replace( $in, $out, $word );
46 // only a few declensions, and even for those mostly the singular only
47 $in = array( '/u[ms]$/', # 2nd declension singular
48 '/a$/', # 1st declension singular
49 '/ommuniam$/', # 3rd declension neuter plural (partly)
50 '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
51 '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
52 '/es$/' # 5th declension singular
58 'tionem', 'ntem', 'atem',
61 return preg_replace( $in, $out, $word );
63 // only a few declensions, and even for those mostly the singular only
64 $in = array( '/u[ms]$/', # 2nd declension singular
65 '/ommunia$/', # 3rd declension neuter plural (partly)
66 '/a$/', # 1st declension singular
67 '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
68 '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
69 '/es$/' # 5th declension singular
75 'tione', 'nte', 'ate',
78 return preg_replace( $in, $out, $word );