MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / set_locale

Method set_locale

core/string/translation_server.cpp:369–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369void TranslationServer::set_locale(const String &p_locale) {
370 String new_locale = standardize_locale(p_locale);
371 if (locale == new_locale) {
372 return;
373 }
374
375 locale = new_locale;
376 ResourceLoader::reload_translation_remaps();
377
378 if (OS::get_singleton()->get_main_loop()) {
379 OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
380 }
381}
382
383String TranslationServer::get_locale() const {
384 return locale;

Callers

nothing calls this directly

Calls 2

get_main_loopMethod · 0.45
notificationMethod · 0.45

Tested by

no test coverage detected