diff options
Diffstat (limited to 'Neutron-trunk/api/lang')
-rw-r--r--[-rwxr-xr-x] | Neutron-trunk/api/lang/processor.php | 9 | ||||
-rw-r--r--[-rwxr-xr-x] | Neutron-trunk/api/lang/setup.php | 0 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Neutron-trunk/api/lang/processor.php b/Neutron-trunk/api/lang/processor.php index 8ab2e99..d9c9566 100755..100644 --- 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."); } diff --git a/Neutron-trunk/api/lang/setup.php b/Neutron-trunk/api/lang/setup.php index 88792e2..88792e2 100755..100644 --- a/Neutron-trunk/api/lang/setup.php +++ b/Neutron-trunk/api/lang/setup.php |