-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.
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user