b9f6992516eaed64fb01e68daa9c95c21b892679
[lhc/web/wiklou.git] / languages / classes / LanguageLa.php
1 <?php
2 /** Latin (lingua Latina)
3 *
4 * @package MediaWiki
5 * @subpackage Language
6 */
7
8 class LanguageLa extends Language {
9 /**
10 * Convert from the nominative form of a noun to some other case
11 *
12 * Just used in a couple places for sitenames; special-case as necessary.
13 * Rules are far from complete.
14 *
15 * Cases: genitive
16 */
17 function convertGrammar( $word, $case ) {
18 global $wgGrammarForms;
19 if ( isset($wgGrammarForms['la'][$case][$word]) ) {
20 return $wgGrammarForms['la'][$case][$word];
21 }
22
23 switch ( $case ) {
24 case 'genitive':
25 // 1st and 2nd declension singular only.
26 $in = array( '/a$/', '/u[ms]$/', '/tio$/' );
27 $out = array( 'ae', 'i', 'tionis' );
28 return preg_replace( $in, $out, $word );
29 default:
30 return $word;
31 }
32 }
33
34 }
35
36
37 ?>