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
16 function convertGrammar( $word, $case ) {
17 global $wgGrammarForms;
18 if ( isset($wgGrammarForms['la'][$case][$word]) ) {
19 return $wgGrammarForms['la'][$case][$word];
24 // only a few declensions, and even for those mostly the singular only
25 $in = array( '/u[ms]$/', # 2nd declension singular
26 '/ommunia$/', # 3rd declension neuter plural (partly)
27 '/a$/', # 1st declension singular
28 '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
29 '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
30 '/es$/' # 5th declension singular
35 'librorum', 'nuntiorum',
36 'tionis', 'ntis', 'atis',
39 return preg_replace( $in, $out, $word );
41 // only a few declensions, and even for those mostly the singular only
42 $in = array( '/u[ms]$/', # 2nd declension singular
43 '/a$/', # 1st declension singular
44 '/ommuniam$/', # 3rd declension neuter plural (partly)
45 '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
46 '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
47 '/es$/' # 5th declension singular
53 'tionem', 'ntem', 'atem',
56 return preg_replace( $in, $out, $word );
58 // only a few declensions, and even for those mostly the singular only
59 $in = array( '/u[ms]$/', # 2nd declension singular
60 '/ommunia$/', # 3rd declension neuter plural (partly)
61 '/a$/', # 1st declension singular
62 '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
63 '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
64 '/es$/' # 5th declension singular
70 'tione', 'nte', 'ate',
73 return preg_replace( $in, $out, $word );