diff --git a/base.php b/base.php index 4a39d6c..528348b 100644 --- a/base.php +++ b/base.php @@ -48,7 +48,11 @@ function localize($phrase) { static $translations = NULL; /* If no instance of $translations has occured load the language file */ if (is_null($translations)) { - $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); + $lang = "en"; + if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) + { + $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); + } $lang_file_en = NULL; $lang_file = 'lang/Localization_' . $lang . '.json'; if (!file_exists($lang_file)) {