language::set_language($_SESSION['language']->code);
+// include $Hooks object if locale file exists
+if(@include_once($path_to_root . "/lang/".$_SESSION['language']->code."/locale.inc"))
+{
+ $Hooks = new Hooks();
+}
+
include_once($path_to_root . "/config.php");
include_once($path_to_root . "/includes/main.inc");