Skip to content

Commit

Permalink
Merge pull request #85787 from bruvzg/locale_upd
Browse files Browse the repository at this point in the history
Do not reload resources and send notification if locale is not changed.
  • Loading branch information
akien-mga committed Dec 6, 2023
2 parents 7233bc6 + 829349d commit d847b6c
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 d847b6c

Please sign in to comment.