You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Stores the text that is displayed to the user.vartext=""setgetset_text# Stores the translation key.varoriginal_text=""funcset_text(p_text):
text=tr(p_text)
original_text=p_textfunc_notification(what):
ifwhat==NOTIFICATION_TRANSLATION_CHANGED:
self.text=tr(original_text)
The text was updated successfully, but these errors were encountered:
Which demo project is affected: Translation Demo
Description:
The Translation demo should include an example of handling translation changes for a custom control in a script.
See https://godotforums.org/discussion/27323/acessing-translations-and-new-scenes where I had to devise some custom code for this, but I don't know if it actually works. Cross-posting it here for posterity:
The text was updated successfully, but these errors were encountered: