From e52bd339054bbb098fe13b0e3eab082cc54adfb2 Mon Sep 17 00:00:00 2001 From: LinuxCat Date: Mon, 15 Feb 2021 19:17:52 +0100 Subject: [PATCH] adding a default option to the auto language selection (#65) * adding a default option to the auto language selection iirc NightScript suggested that a while ago or maybe it was giratina62 i don't remember exactly. also this is deleting untranslated languages cause they are useless now that there's a default option. * Commenting untranslated languages --- source/utils/config.cpp | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/source/utils/config.cpp b/source/utils/config.cpp index 9e875b7..b2e9abb 100644 --- a/source/utils/config.cpp +++ b/source/utils/config.cpp @@ -61,15 +61,17 @@ void Config::sysLang() { case 5: this->language("es"); break; - + + /* case 6: - this->language("en"); // Simplified chinese, not translated. + this->language("sc"); //simplified chinese break; - + case 7: - this->language("en"); // Korean, not translated. + this->language("kr") //korean break; - + */ + case 8: this->language("nl"); break; @@ -79,11 +81,17 @@ void Config::sysLang() { break; case 10: - this->language("ru"); + this->language("ru"); break; - + + /* case 11: - this->language("en"); // traditional chinese, not translated. + this->language("tc") //traditional chinese + break; + */ + + default: + this->language("en"); //for Simplified chinese (6), korean (7) and traditional chinese (11), which are not translated. also in case something goes wrong break; } } @@ -180,4 +188,4 @@ std::string Config::getString(const std::string &key) { return this->json.at(key).get_ref(); } -void Config::setString(const std::string &key, const std::string &v) { this->json[key] = v; }; \ No newline at end of file +void Config::setString(const std::string &key, const std::string &v) { this->json[key] = v; };