getLanguageToLoad(); $translations = array(); require_once "lang/" . $language .".php"; $this->addTranslationArray($translations); } public function addTranslationArray($translation) { // we could check that no string overlap here $GLOBALS['Piwik_translations'] = array_merge($GLOBALS['Piwik_translations'], $translation); } /** * Enter description here... * * @return string the language filename prefix, eg "en" for english * @throws exception if the language set in the config file is not a valid filename */ public function getLanguageToLoad() { $language = Zend_Registry::get('config')->Language->current; if( Piwik_Common::isValidFilename($language)) { return $language; } else { throw new Exception("The language selected ('$language') is not a valid language file "); } } /** * Generate javascript translations array * * @return string containing javascript code with translations array (including