Page 1 of 3
How Can I Refresh UI Language After Change Language?
Posted: Fri Feb 17, 2023 6:45 am
by wlchfl5359
Hi,
When after I change language, language on UI is still same.
So after I deactive and active again, it changes with new language.
Is there way to refresh languages immediately after change language?
Thank you.
Re: How Can I Refresh UI Language After Change Language?
Posted: Fri Feb 17, 2023 9:49 am
by Tony Li
Hi,
How are you changing language? If you use
DialogueManager.SetLanguage(), it should update UIs.
Re: How Can I Refresh UI Language After Change Language?
Posted: Fri Feb 17, 2023 10:32 am
by wlchfl5359
Thank you for reply.
I update using DialogueManager.SetLanguage("english");
But UI shows past language...
It changes when I deactive gameobject and active it again.
Re: How Can I Refresh UI Language After Change Language?
Posted: Fri Feb 17, 2023 5:12 pm
by Tony Li
Hi,
Are you using the current version of the Dialogue System? (Version 2.2.34 as of this reply.)
Re: How Can I Refresh UI Language After Change Language?
Posted: Wed Feb 22, 2023 7:53 am
by wlchfl5359
No, I'm using 2.2.25.1
Is not working in this version??
Re: How Can I Refresh UI Language After Change Language?
Posted: Wed Feb 22, 2023 8:47 am
by Tony Li
A bug was fixed in a later version. Please back up your project, make sure the backup is good, and then update to the current version. You can review release notes here:
Release Notes
Re: How Can I Refresh UI Language After Change Language?
Posted: Wed Feb 22, 2023 9:41 am
by wlchfl5359
Thank you for reply.
But it is weird. I just updated to the current version and it is still same.
I have a Localize UI component and TextMeshPro - Text(UI) in text object and it changes language only when i deactive and active object..
Re: How Can I Refresh UI Language After Change Language?
Posted: Wed Feb 22, 2023 10:03 am
by Tony Li
How are you changing languages? Are you using
DialogueManager.SetLanguage()?
Re: How Can I Refresh UI Language After Change Language?
Posted: Wed Feb 22, 2023 10:10 am
by wlchfl5359
I use only this code DialogueManager.SetLanguage("english");
do i have to change something in dialogue system controller or somewhere?
Re: How Can I Refresh UI Language After Change Language?
Posted: Wed Feb 22, 2023 10:27 am
by Tony Li
That's correct. Are there any warnings in the Console window when you change languages?
During play, are there more than one UILocalizationManager components? (There should be only one.)
Can you send a
reproduction project to tony (at) pixelcrushers.com?
If not, then please open UILocalizationManager.cs in your code editor. Put a breakpoint in the UpdateUIs() method at the bottom of the script. Play the scene, change languages, and step through the code to make sure that it finds all of the LocalizeUI components and tells them to update their texts.