name = $name; } public function get_message($code){ global $base_path,$msg, $lang; if(!isset(self::$messages)){ if(file_exists($base_path.'/plugins/'.$this->name.'/includes/messages/'.$lang.'.xml')){ $xml = new XMLlist($base_path.'/plugins/'.$this->name.'/includes/messages/'.$lang.'.xml'); $xml->analyser(); self::$messages = $xml->table; } } if(isset(self::$messages[$code])){ return self::$messages[$code]; } if(isset($msg[$code])){ return $msg[$code]; } return $code; } }