3 * Latin (lingua Latina) specific code.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
25 * Latin (lingua Latina)
29 class LanguageLa
extends Language
{
31 * Convert from the nominative form of a noun to some other case
33 * Just used in a couple places for sitenames; special-case as necessary.
34 * Rules are far from complete.
36 * Cases: genitive, accusative, ablative
43 function convertGrammar( $word, $case ) {
44 global $wgGrammarForms;
45 if ( isset( $wgGrammarForms['la'][$case][$word] ) ) {
46 return $wgGrammarForms['la'][$case][$word];
51 // only a few declensions, and even for those mostly the singular only
52 $in = array( '/u[ms]$/', # 2nd declension singular
53 '/ommunia$/', # 3rd declension neuter plural (partly)
54 '/a$/', # 1st declension singular
55 '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
56 '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
57 '/es$/' # 5th declension singular
62 'librorum', 'nuntiorum',
63 'tionis', 'ntis', 'atis',
66 return preg_replace( $in, $out, $word );
68 // only a few declensions, and even for those mostly the singular only
69 $in = array( '/u[ms]$/', # 2nd declension singular
70 '/a$/', # 1st declension singular
71 '/ommuniam$/', # 3rd declension neuter plural (partly)
72 '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
73 '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
74 '/es$/' # 5th declension singular
80 'tionem', 'ntem', 'atem',
83 return preg_replace( $in, $out, $word );
85 // only a few declensions, and even for those mostly the singular only
86 $in = array( '/u[ms]$/', # 2nd declension singular
87 '/ommunia$/', # 3rd declension neuter plural (partly)
88 '/a$/', # 1st declension singular
89 '/libri$/', '/nuntii$/', # 2nd declension plural (partly)
90 '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
91 '/es$/' # 5th declension singular
97 'tione', 'nte', 'ate',
100 return preg_replace( $in, $out, $word );