negotiate($override); $_SESSION['locale'] = $best_match; } putenv('LANGUAGE='.$_SESSION['locale'].'.UTF-8'); setlocale(LC_ALL, $_SESSION['locale'].".UTF-8"); setlocale(LC_MESSAGES, $_SESSION['locale'].".UTF-8"); bindtextdomain("server-status", __DIR__ . "/locale/"); bind_textdomain_codeset("server-status", "utf-8"); textdomain("server-status"); //Database connection $mysqli = new mysqli("##server##","##user##","##password##","##database##"); if ($mysqli->connect_errno) { printf(_("Connection failed: %s\n"), $mysqli->connect_error); exit(); } $mysqli->set_charset("utf8");