load_hooks(); call_hooks('init_1'); } App::$language = get_best_language(); load_translation_table(App::$language, App::$install); /** * * Important stuff we always need to do. * * The order of these may be important so use caution if you think they're all * intertwingled with no logical order and decide to sort it out. Some of the * dependencies have changed, but at least at one time in the recent past - the * order was critical to everything working properly * */ \Zotlabs\Web\Session::start(); /** * Language was set earlier, but we can over-ride it in the session. * We have to do it here because the session was just now opened. */ if (array_key_exists('system_language', $_POST)) { if (strlen($_POST['system_language'])) { $_SESSION['language'] = $_POST['system_language']; } else { unset($_SESSION['language']); } } if (x($_SESSION, 'language') && $_SESSION['language'] !== $lang) { App::$language = $_SESSION['language']; load_translation_table(App::$language); }