From 7b4af63a90a726b98a59b83e53f040a7a566a11d Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 10 Nov 2021 17:53:13 +0100 Subject: Update --- Neutron-trunk/api/lang/processor.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) mode change 100755 => 100644 Neutron-trunk/api/lang/processor.php (limited to 'Neutron-trunk/api/lang/processor.php') diff --git a/Neutron-trunk/api/lang/processor.php b/Neutron-trunk/api/lang/processor.php old mode 100755 new mode 100644 index 8ab2e99..d9c9566 --- a/Neutron-trunk/api/lang/processor.php +++ b/Neutron-trunk/api/lang/processor.php @@ -27,9 +27,10 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/" . $langsel)) { } } } else { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/fr")) { + $langsel = "en"; + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/en")) { echo("Unable to load language files: unable to find selected language files, loading fallback files"); - $langprops = scandir($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/fr/"); + $langprops = scandir($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/en/"); foreach ($langprops as $langprop) { if ($langprop != "." && $langprop != "..") { $langpieces = explode("/", implode("/", explode("\\", $langprop))); @@ -38,9 +39,9 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/" . $langsel)) { if ($langitemsel[count($langitemsel) - 1] != "json") { require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("Unable to load language file: " . implode(".", $langitemsel) . " is not in a valid format. Language files must be JSON."); } else { - json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/fr/" . $langprop), true); + json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/en/" . $langprop), true); if (json_last_error() == JSON_ERROR_NONE) { - $lang[$langitemsel[count($langitemsel) - 2]] = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/fr/" . $langprop), true); + $lang[$langitemsel[count($langitemsel) - 2]] = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/i18n/en/" . $langprop), true); } else { require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("Unable to load language file: " . implode(".", $langitemsel) . " isn't a valid JSON file. Please check for syntax errors and retry."); } -- cgit