2003-12-18 02:41:39 +00:00
|
|
|
<?php
|
2005-04-09 05:30:15 +00:00
|
|
|
/** Latin (lingua Latina)
|
|
|
|
|
*
|
2007-01-20 15:09:52 +00:00
|
|
|
* @addtogroup Language
|
2005-04-05 11:00:27 +00:00
|
|
|
*/
|
2003-12-18 02:41:39 +00:00
|
|
|
|
2006-07-26 07:15:39 +00:00
|
|
|
class LanguageLa extends Language {
|
2005-05-06 02:38:42 +00:00
|
|
|
/**
|
|
|
|
|
* Convert from the nominative form of a noun to some other case
|
|
|
|
|
*
|
|
|
|
|
* Just used in a couple places for sitenames; special-case as necessary.
|
|
|
|
|
* Rules are far from complete.
|
2006-06-11 15:40:17 +00:00
|
|
|
*
|
|
|
|
|
* Cases: genitive
|
2005-05-06 02:38:42 +00:00
|
|
|
*/
|
|
|
|
|
function convertGrammar( $word, $case ) {
|
2006-05-25 14:31:28 +00:00
|
|
|
global $wgGrammarForms;
|
2006-05-25 20:52:45 +00:00
|
|
|
if ( isset($wgGrammarForms['la'][$case][$word]) ) {
|
|
|
|
|
return $wgGrammarForms['la'][$case][$word];
|
2006-05-25 14:31:28 +00:00
|
|
|
}
|
|
|
|
|
|
2005-05-06 02:38:42 +00:00
|
|
|
switch ( $case ) {
|
|
|
|
|
case 'genitive':
|
|
|
|
|
// 1st and 2nd declension singular only.
|
2005-07-05 07:24:21 +00:00
|
|
|
$in = array( '/a$/', '/u[ms]$/', '/tio$/' );
|
|
|
|
|
$out = array( 'ae', 'i', 'tionis' );
|
2005-05-06 02:38:42 +00:00
|
|
|
return preg_replace( $in, $out, $word );
|
|
|
|
|
default:
|
|
|
|
|
return $word;
|
|
|
|
|
}
|
2004-02-28 07:23:04 +00:00
|
|
|
}
|
2003-12-18 02:41:39 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2004-02-28 07:23:04 +00:00
|
|
|
|
2004-03-20 15:03:26 +00:00
|
|
|
?>
|