detectUserLanguage(); if(!$lang) { $lang = LanguageUtils::i()->getDefaultLanguage(); } $_SESSION["userlanguageid"] = $lang->getLanguageId(); } // Shortcut to language functions { /** * Shortcut to translate and output the result */ function __($identifier, $args = []) { echo __get($identifier, $args); } /** * Shortcut to translate and return the result */ function __get($identifier, $args = []) { try { return LanguageUtils::i()->translate($identifier, $args); } catch (\Exception $e) { return "(unknown translation for " . Utils::escape($identifier) . ")"; } } } // Set timezone date_default_timezone_set(Config::get("timezone")); // Init TS3 library // This makes it possible to cache TS3 library objects TeamSpeak3::init(); // Sync server icon cache if needed ServerIconCache::syncIfNeeded();