From 1f8451001d69df708ef788b8730cf13a11a75065 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 9 Jan 2017 16:43:44 -0300 Subject: -Translation text will change automatically for in-game buttons, labels, poups when translation is changed. -Added a NOTIFICATION_TRANSLATION_CHANGED for controls that need custom code -Sorry, editor will not update automatically because it uses a different translatio method. --- core/translation.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/translation.cpp') 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 { -- cgit v1.2.3-70-g09d2