summaryrefslogtreecommitdiffstats
path: root/core/string/translation_domain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/string/translation_domain.cpp')
-rw-r--r--core/string/translation_domain.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/string/translation_domain.cpp b/core/string/translation_domain.cpp
index cf6689efff..1ff8dcd752 100644
--- a/core/string/translation_domain.cpp
+++ b/core/string/translation_domain.cpp
@@ -247,7 +247,10 @@ PackedStringArray TranslationDomain::get_loaded_locales() const {
PackedStringArray locales;
for (const Ref<Translation> &E : translations) {
ERR_CONTINUE(E.is_null());
- locales.push_back(E->get_locale());
+ const String &locale = E->get_locale();
+ if (!locales.has(locale)) {
+ locales.push_back(locale);
+ }
}
return locales;
}