Revert redlinks for user-tools special:contributions links for now; tim complains...
[mediawiki.git] / languages / classes / LanguageLa.php
blobb8bf9a6e4bcbc148dc372a10a39578bdbd9a4054
1 <?php
2 /** Latin (lingua Latina)
4 * @addtogroup Language
5 */
7 class LanguageLa extends Language {
8 /**
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
16 function convertGrammar( $word, $case ) {
17 global $wgGrammarForms;
18 if ( isset($wgGrammarForms['la'][$case][$word]) ) {
19 return $wgGrammarForms['la'][$case][$word];
22 switch ( $case ) {
23 case 'genitive':
24 // 1st and 2nd declension singular only.
25 $in = array( '/a$/', '/u[ms]$/', '/tio$/' );
26 $out = array( 'ae', 'i', 'tionis' );
27 return preg_replace( $in, $out, $word );
28 default:
29 return $word;