<?php
-
/** Nahuatl
*
* @package MediaWiki
require_once( 'LanguageEs.php' );
-$wgAllMessagesNah = array(
-
- # Month names
- 'january' => 'Tlacenti',
- 'february' => 'Tlaonti',
- 'march' => 'Tlayeti',
- 'april' => 'Tlanauhtl',
- 'may' => 'Tlamacuilti',
- 'june' => 'Tlachicuazti',
- 'august' => 'Tlachiconti',
- 'september' => 'Tlachicnauhti',
- 'october' => 'Tlamatlacti',
- 'november' => 'Tlamactlihuanceti',
- 'december' => 'Tlamactlihuanonti',
-
- # Days of the week
- 'monday' => 'Metztlitonal',
- 'tuesday' => 'Huitzilopochtonal',
- 'wednesday' => 'Yacatlipotonal',
- 'thursday' => 'Tezcatlipotonal',
- 'friday' => 'Quetzalcoatonal',
- 'saturday' => 'Tlaloctitonal',
- 'sunday' => 'Tonatiutonal',
-
- # Preferences etc.
- 'userlogin' => 'Calaqui / Registrarse',
- 'yourlanguage' => 'Tlahtolli:',
- 'yourpassword' => 'Tlahtolichtacayo',
- 'yourpasswordagain' => 'Tlahtolichtacayo zapa'
-
-);
+if (!$wgCachedMessageArrays) {
+ require_once('MessagesNah.php');
+}
+
+# Per conversation with a user in IRC, we inherit from Spanish and work from there
+# Nahuatl was the language of the Aztecs, and a modern speaker is most likely to
+# understand Spanish if a Nah translation is not available
class LanguageNah extends LanguageEs {
+ private $mMessagesNah = null;
- # Per conversation with a user in IRC, we inherit from Spanish and work from there
- # Nahuatl was the language of the Aztecs, and a modern speaker is most likely to
- # understand Spanish if a Nah translation is not available
+ function __construct() {
+ parent::__construct();
- function getMessage( $key ) {
global $wgAllMessagesNah;
- return isset( $wgAllMessagesNah[$key] ) ? $wgAllMessagesNah[$key] : parent::getMessage( $key );
+ $this->mMessagesNah =& $wgAllMessagesNah;
+
+ }
+
+ function getFallbackLanguage() {
+ return 'es';
+ }
+
+ function getMessage( $key ) {
+ if( isset( $this->mMessagesNah[$key] ) ) {
+ return $this->mMessagesNah[$key];
+ } else {
+ return parent::getMessage( $key );
+ }
+ }
+
+ function getAllMessages() {
+ return $this->mMessagesNah;
}
}