summaryrefslogtreecommitdiffstats
path: root/core/string
diff options
context:
space:
mode:
Diffstat (limited to 'core/string')
-rw-r--r--core/string/translation.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/string/translation.cpp b/core/string/translation.cpp
index a443ed308d..8fcf2b24b5 100644
--- a/core/string/translation.cpp
+++ b/core/string/translation.cpp
@@ -518,8 +518,12 @@ String TranslationServer::get_country_name(const String &p_country) const {
}
void TranslationServer::set_locale(const String &p_locale) {
- locale = standardize_locale(p_locale);
+ String new_locale = standardize_locale(p_locale);
+ if (locale == new_locale) {
+ return;
+ }
+ locale = new_locale;
ResourceLoader::reload_translation_remaps();
if (OS::get_singleton()->get_main_loop()) {