2 /** Latin (lingua Latina)
8 if (!$wgCachedMessageArrays) {
9 require_once('MessagesLa.php');
12 class LanguageLa
extends LanguageUtf8
{
13 private $mMessagesLa, $mNamespaceNamesLa = null;
15 private $mQuickbarSettingsLa = array(
16 'Nullus', 'Constituere a sinistra', 'Constituere a dextra', 'Innens a sinistra'
19 private $mSkinNamesLa = array(
20 'standard' => 'Norma',
21 'nostalgia' => 'Nostalgia',
22 'cologneblue' => 'Caerulus Colonia'
25 function __construct() {
26 parent
::__construct();
28 global $wgAllMessagesLa;
29 $this->mMessagesLa
=& $wgAllMessagesLa;
31 global $wgMetaNamespace;
32 $this->mNamespaceNamesLa
= array(
33 NS_SPECIAL
=> 'Specialis',
35 NS_TALK
=> 'Disputatio',
37 NS_USER_TALK
=> 'Disputatio_Usoris',
38 NS_PROJECT
=> $wgMetaNamespace,
39 NS_PROJECT_TALK
=> 'Disputatio_' . $this->convertGrammar( $wgMetaNamespace, 'genitive' ),
41 NS_IMAGE_TALK
=> 'Disputatio_Imaginis',
42 NS_MEDIAWIKI
=> 'MediaWiki',
43 NS_MEDIAWIKI_TALK
=> 'Disputatio_MediaWiki',
44 NS_TEMPLATE
=> 'Formula',
45 NS_TEMPLATE_TALK
=> 'Disputatio_Formulae',
46 NS_HELP
=> 'Auxilium',
47 NS_HELP_TALK
=> 'Disputatio_Auxilii',
48 NS_CATEGORY
=> 'Categoria',
49 NS_CATEGORY_TALK
=> 'Disputatio_Categoriae',
54 function getNamespaces() {
55 return $this->mNamespaceNamesLa + parent
::getNamespaces();
58 function getQuickbarSettings() {
59 return $this->mQuickbarSettingsLa
;
62 function getSkinNames() {
63 return $this->mSkinNamesLa + parent
::getSkinNames();
66 function getMessage( $key ) {
67 if( isset( $this->mMessagesLa
[$key] ) ) {
68 return $this->mMessagesLa
[$key];
70 return parent
::getMessage( $key );
74 function getAllMessages() {
75 return $this->mMessagesLa
;
78 function getNsIndex( $text ) {
79 global $wgMetaNamespace;
81 foreach ( $this->mNamespaceNamesLa
as $i => $n ) {
82 if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
85 # Backwards compatibility hacks
86 if( $wgMetaNamespace == 'Vicipaedia' ||
$wgMetaNamespace == 'Victionarium' ) {
87 if( 0 == strcasecmp( 'Disputatio_Wikipedia', $text ) ) return NS_PROJECT_TALK
;
93 * Convert from the nominative form of a noun to some other case
95 * Just used in a couple places for sitenames; special-case as necessary.
96 * Rules are far from complete.
100 function convertGrammar( $word, $case ) {
101 global $wgGrammarForms;
102 if ( isset($wgGrammarForms['la'][$case][$word]) ) {
103 return $wgGrammarForms['la'][$case][$word];
108 // 1st and 2nd declension singular only.
109 $in = array( '/a$/', '/u[ms]$/', '/tio$/' );
110 $out = array( 'ae', 'i', 'tionis' );
111 return preg_replace( $in, $out, $word );