Localization difference between editor and full build

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mgregoirelds
Posts: 106
Joined: Wed Aug 23, 2017 4:10 pm
Location: Canada

Localization difference between editor and full build

Post by mgregoirelds »

Hello,

I'm currently experiencing a weird issue with localization. I've started experimenting with adding Localize UI script to text label that we currently have in the UI. I added a few entries with "fr-CA" in the Text Table and when I do set the Language option in Localization Settings of Dialogue System Controller, it works perfectly.

However, I do have a strange behavior with the Unity editor. When I'm removing the language (putting empty string) in Localization Settings, I'm still getting my text displayed in French. However, upon doing a full build (instead of running the game through the editor) the text is displayed in English. Any idea on what is going on?
Unity 2022.3.17f1
Dialogue System 2.2.44.1
OpenAI Addon 1.0.12
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Localization difference between editor and full build

Post by Tony Li »

Hi Maxime,

Is Use System Language ticked?

The current language gets stored in PlayerPrefs. (In the key "Language" unless you've added a UI Localization Manager component to the Dialogue Manager and specified a different key.) Maybe this PlayerPrefs key is being read in the editor but not in the build.

BTW, you can clear the "Language" PlayerPrefs key in the Unity editor by selecting Tools > Pixel Crushers > Dialogue System > Tools > Clear Saved Localization Settings.
mgregoirelds
Posts: 106
Joined: Wed Aug 23, 2017 4:10 pm
Location: Canada

Re: Localization difference between editor and full build

Post by mgregoirelds »

Hello Tony,

No it is not. I do remember that I did at some point tick this option but it is not when I'm getting the issue.
Unity 2022.3.17f1
Dialogue System 2.2.44.1
OpenAI Addon 1.0.12
mgregoirelds
Posts: 106
Joined: Wed Aug 23, 2017 4:10 pm
Location: Canada

Re: Localization difference between editor and full build

Post by mgregoirelds »

By the way, clearing the PlayerPrefs did work.
Unity 2022.3.17f1
Dialogue System 2.2.44.1
OpenAI Addon 1.0.12
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Localization difference between editor and full build

Post by Tony Li »

Great! Thank you for letting me know.
mgregoirelds
Posts: 106
Joined: Wed Aug 23, 2017 4:10 pm
Location: Canada

Re: Localization difference between editor and full build

Post by mgregoirelds »

Still, it looks like something got stuck into PlayerPrefs. I will let you know if I repro the issue.
Unity 2022.3.17f1
Dialogue System 2.2.44.1
OpenAI Addon 1.0.12
Post Reply