blob: d29a53e278ff3d00d0e5e66c266af7fff9390b39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<?php
/** Nahuatl
*
* @package MediaWiki
* @subpackage Language
*
* @author Rob Church <robchur@gmail.com>
*
* @copyright Copyright © 2006, Rob Church
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
require_once( 'LanguageEs.php' );
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;
function __construct() {
parent::__construct();
global $wgAllMessagesNah;
$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;
}
}
?>
|