setAll($CONF); $PALANG = []; require_once("$incpath/functions.inc.php"); if (defined('POSTFIXADMIN_CLI')) { $language = 'en'; # TODO: make configurable or autodetect from locale settings } else { $language = Languages::check_language(); $_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: */