setAll($CONF); $PALANG = []; require_once("$incpath/languages/language.php"); require_once("$incpath/functions.inc.php"); if (defined('POSTFIXADMIN_CLI')) { $language = 'en'; # TODO: make configurable or autodetect from locale settings } else { $language = check_language(); # TODO: storing the language only at login instead of calling check_language() on every page would save some processor cycles ;-) $_SESSION['lang'] = $language; } if (!empty($language)) { require_once("$incpath/languages/" . $language . ".lang"); } if (!empty($CONF['language_hook']) && function_exists($CONF['language_hook'])) { $hook_func = $CONF['language_hook']; $PALANG = $hook_func($PALANG, $language); } Config::write('__LANG', $PALANG); if (!defined('POSTFIXADMIN_CLI')) { if (!isset($PALANG)) { die("environment not setup correctly"); } Smarty_Autoloader::register(); } /* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */