Skip to content

Commit

Permalink
Do not reload resources and send notification if locale is not changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruvzg committed Dec 5, 2023
1 parent 654132c commit 829349d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/string/translation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 829349d

Please sign in to comment.