X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2FLanguageNah.php;h=d29a53e278ff3d00d0e5e66c266af7fff9390b39;hb=5464f8301da49fab3218aaa50b6492aae67e5797;hp=510d5a16ce934afd5a7beb35b46418444f3f40c4;hpb=e67f47ea5722d75b014773a51036389cb30d3039;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/LanguageNah.php b/languages/LanguageNah.php index 510d5a16ce..d29a53e278 100644 --- a/languages/LanguageNah.php +++ b/languages/LanguageNah.php @@ -1,5 +1,4 @@ '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; } }