* Restructured
This commit is contained in:
parent
c874f4cc55
commit
cf96512930
2 changed files with 27 additions and 7 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** Nahuatl
|
/** Nahuatl
|
||||||
*
|
*
|
||||||
* @package MediaWiki
|
* @package MediaWiki
|
||||||
|
|
@ -17,15 +16,35 @@ if (!$wgCachedMessageArrays) {
|
||||||
require_once('MessagesNah.php');
|
require_once('MessagesNah.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
class LanguageNah extends LanguageEs {
|
|
||||||
|
|
||||||
# Per conversation with a user in IRC, we inherit from Spanish and work from there
|
# 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
|
# Nahuatl was the language of the Aztecs, and a modern speaker is most likely to
|
||||||
# understand Spanish if a Nah translation is not available
|
# understand Spanish if a Nah translation is not available
|
||||||
|
|
||||||
function getMessage( $key ) {
|
class LanguageNah extends LanguageEs {
|
||||||
|
private $mMessagesNah = null;
|
||||||
|
|
||||||
|
function __construct() {
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
global $wgAllMessagesNah;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
global $wgAllMessagesNah;
|
||||||
$wgAllMessagesNah = array(
|
$wgAllMessagesNah = array(
|
||||||
|
|
||||||
# Month names
|
# Month names
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue