aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky2017-01-09 16:43:44 -0300
committerJuan Linietsky2017-01-09 16:43:44 -0300
commit1f8451001d69df708ef788b8730cf13a11a75065 (patch)
treeb40bbcd7b61781e17bde271ad2a9ec09cba2fd2c /core
parente9bb65db815b593037a573c1c7a78e95b7550cb0 (diff)
downloadgodot-1f8451001d69df708ef788b8730cf13a11a75065.tar.gz
godot-1f8451001d69df708ef788b8730cf13a11a75065.tar.zst
godot-1f8451001d69df708ef788b8730cf13a11a75065.zip
Diffstat (limited to 'core')
-rw-r--r--core/os/main_loop.h1
-rw-r--r--core/translation.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/core/os/main_loop.h b/core/os/main_loop.h
index 6506a280a..525106142 100644
--- a/core/os/main_loop.h
+++ b/core/os/main_loop.h
@@ -54,6 +54,7 @@ public:
NOTIFICATION_WM_QUIT_REQUEST = 7,
NOTIFICATION_WM_UNFOCUS_REQUEST = 8,
NOTIFICATION_OS_MEMORY_WARNING = 9,
+ NOTIFICATION_TRANSLATION_CHANGED = 10,
};
virtual void input_event( const InputEvent& p_event );
diff --git a/core/translation.cpp b/core/translation.cpp
index 22d873f70..dd0f59f34 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -939,6 +939,10 @@ void TranslationServer::set_locale(const String& p_locale) {
else {
locale=univ_locale;
}
+
+ if (OS::get_singleton()->get_main_loop()) {
+ OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
+ }
}
String TranslationServer::get_locale() const {