function translate($TranslationFile) { global $FreedomCore; $Language = str_replace('.language', '', $FreedomCore->loadLanguage()); try { Smarty::configLoad($Language . DS . $TranslationFile . '.language'); } catch (Exception $e) { Debugger::ReportError(3, 2, $TranslationFile . '.language in ' . $Language . ' language folder'); die; } }
public static function ReportError($ErrorCategory, $ErrorID, $CausedBy, $ReportAs = 'html') { if ($ReportAs == 'html') { die('<strong>' . Debugger::ErrorCategory($ErrorCategory) . ': </strong> <i>Error #' . $ErrorID . ':</i> ' . Debugger::ErrorID($ErrorCategory, $ErrorID) . ' <strong><font color="red">' . $CausedBy . '</font></strong>'); } }
/** * Load Configuration FIle * Including Configuration file or Returning Debugger Error */ public function loadConfig() { if (!isset($_ENV['installation_in_progress'])) { $Configuration = FreedomCore::getConfigDir() . 'Configuration.php'; if (file_exists($Configuration)) { require_once $Configuration; } else { System\Debugger::ReportError(1, 2, 'Configuration File'); } } }