[HOWTO] How To: Localize Using i2 Localization and Dialogue System
Posted: Fri Aug 14, 2020 9:58 am
A Quest Machine user asked about localizing using i2 Localization.
If you also have the Dialogue System, tou can use the Dialogue System's i2 Localization with Quest Machine.
Quest Machine can use Text Tables. Instead of writing your text directly in the quest:
Write it in a text table:
Then assign that text table field to the quest:
Then you can use the DS To I2 window to translate the text table using i2 Localization:
Or, if you're not using i2 Localization, you can export your text table to CSV, send it to a translator, and import the CSV back into the text table.
Note that the Quest Editor also has a menu option to move all of a quest's text into a text table. So you can write your text initially in the quest itself, then later move it into a text table to handle localization.
To set the current language, add a UILocalizationManager component to the Quest Machine GameObject. Then, in code, set UILocalizationManager.currentLanguage:
If you also have the Dialogue System, tou can use the Dialogue System's i2 Localization with Quest Machine.
Quest Machine can use Text Tables. Instead of writing your text directly in the quest:
Write it in a text table:
Then assign that text table field to the quest:
Then you can use the DS To I2 window to translate the text table using i2 Localization:
Or, if you're not using i2 Localization, you can export your text table to CSV, send it to a translator, and import the CSV back into the text table.
Note that the Quest Editor also has a menu option to move all of a quest's text into a text table. So you can write your text initially in the quest itself, then later move it into a text table to handle localization.
To set the current language, add a UILocalizationManager component to the Quest Machine GameObject. Then, in code, set UILocalizationManager.currentLanguage:
Code: Select all
UILocalizationManager.instance.currentLanguage = "fr"; // Set to French.