* Restructured
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Fri, 23 Jun 2006 22:16:26 +0000 (22:16 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Fri, 23 Jun 2006 22:16:26 +0000 (22:16 +0000)
languages/LanguageNah.php
languages/MessagesNah.php

index dfed532..d29a53e 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /** Nahuatl
   *
   * @package MediaWiki
@@ -17,15 +16,35 @@ 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;
        }
 
 }
index 474027f..9ebf344 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+global $wgAllMessagesNah;
 $wgAllMessagesNah = array(
 
        # Month names