2 * Latin (lingua Latina) language functions
3 * @author Santhosh Thottingal
6 mediaWiki.language.convertGrammar = function ( word, form ) {
7 var grammarForms = mediaWiki.language.getData( 'la', 'grammarForms' );
8 if ( grammarForms && grammarForms[form] ) {
9 return grammarForms[form][word];
13 // only a few declensions, and even for those mostly the singular only
14 word = word.replace( /u[ms]$/i, 'i' ); // 2nd declension singular
15 word = word.replace( /ommunia$/i, 'ommunium' ); // 3rd declension neuter plural (partly)
16 word = word.replace( /a$/i, 'ae' ); // 1st declension singular
17 word = word.replace( /libri$/i,'librorum' ); // 2nd declension plural (partly)
18 word = word.replace( /nuntii$/i, 'nuntiorum' ); // 2nd declension plural (partly)
19 word = word.replace( /tio$/i,'tionis' ); // 3rd declension singular (partly)
20 word = word.replace( /ns$/i, 'ntis' );
21 word = word.replace( /as$/i, 'atis' );
22 word = word.replace( /es$/i, 'ei' ); // 5th declension singular
25 // only a few declensions, and even for those mostly the singular only
26 word = word.replace( /u[ms]$/i, 'um' ); // 2nd declension singular
27 word = word.replace( /ommunia$/i, 'am' ); // 3rd declension neuter plural (partly)
28 word = word.replace( /a$/i, 'ommunia' ); // 1st declension singular
29 word = word.replace( /libri$/i,'libros' ); // 2nd declension plural (partly)
30 word = word.replace( /nuntii$/i, 'nuntios' );// 2nd declension plural (partly)
31 word = word.replace( /tio$/i,'tionem' ); // 3rd declension singular (partly)
32 word = word.replace( /ns$/i, 'ntem' );
33 word = word.replace( /as$/i, 'atem');
34 word = word.replace( /es$/i, 'em' ); // 5th declension singular
37 // only a few declensions, and even for those mostly the singular only
38 word = word.replace( /u[ms]$/i, 'o' ); // 2nd declension singular
39 word = word.replace( /ommunia$/i, 'ommunibus' ); // 3rd declension neuter plural (partly)
40 word = word.replace( /a$/i, 'a' ); // 1st declension singular
41 word = word.replace( /libri$/i,'libris' ); // 2nd declension plural (partly)
42 word = word.replace( /nuntii$/i, 'nuntiis' ); // 2nd declension plural (partly)
43 word = word.replace( /tio$/i,'tione' ); // 3rd declension singular (partly)
44 word = word.replace( /ns$/i, 'nte' );
45 word = word.replace( /as$/i, 'ate');
46 word = word.replace( /es$/i, 'e' ); // 5th declension singular