I have the settings to select the language in the main menu it works fine in the main menu when I change the language from English to Portuguese, but when I change the scene the language reverts back to English(default), even though The selected language shown above in the Editor is Portuguese.
Another Problem is Sometimes When I show 2 Text boxes one after another when Portuguese is selected, The first one appears in Portuguese but the second one appears in English even though again The selected language shown above in the Editor is Portuguese.
How are these text boxes being localized? Are you using a LocalizedStringEvent or a custom script?
When you switch language through the language bar do they update or always stay in English?
I am using localized string events, They do update when I change the language in main menu but as soon as I change the scene they switch back to english.
Nothing stands out from the screenshots.
Can you show a screenshot of the Text components and its LocalizeStringEvent inspector when its showing the wrong language?
There’s a problem with your language changer script. Don’t hold public references to Locales in script. It will create duplicates in the build.
Instead use the LocaleIdentifier struct.
Also don’t use player prefs, instead add the Player pref selector to the localization settings locale selectors. Move it to the top of the list.
Also try disabling WaitForCompletion on the localized string event for the object that is not working. See if that makes a difference.
Okay, I will try. But this script only works once in the main menu, which shows correct language, when I change the scene the script does not destroy on load and there is no change made, but there the text does not show correctly, but I will try what you just said.
Okay I did try to disable WaitForCompletion but it did not work, one more thing when I try to change the language back to English and then again Portuguese while in the level scene then I can see the language being changed on the text component.
I’m afraid I’m out of ideas. We will need a bug report with a reproduction project that shows this issue so we can debug and understand what’s going on.
There is another thing I have noticed, there is a text called Level, its value is changing in the new scene because it’s an Active component when the scene is started. But the dialogues are inactive at the start of the scene, they are made active after a few seconds. Only dialogue text is not changing.