This page describes how to set up the Dialogue System with Inter Illusion's I2 Localization. (I2 Localization is required.)
I2 Localization copyright © Inter Illusion.
The I2 Localization Support package adds these features:
Import the package Third Party Support ► I2 Localization Support. This will unpack files into the folder Assets ► Pixel Crushers ► Dialogue System ► Third Party Support ► I2 Localization Support.
This integration can work with:
If the currently-open scene has a LanguageSource component, it will always be used first.
The default I2Languages asset and other LanguageSourceAssets or LanguageSource components you use with this integration should all have the exact same language list, in the exact same order.
By default, the I2 Localization integration will name localized fields in your dialogue database and/or localized text table using I2 Localization's language codes. This is preferable to using language names because language codes are typically standard ASCII text, whereas language names may contain non-ASCII international characters that can cause problems when translating field names into the Lua environment.
In the DS To I2 editor window and the Dialogue System Use I2 Language script, you can specify whether to use language codes or language names, but language codes are recommended.
You may also find it helpful to use the Localization Tools Window to copy Dialogue Text and Menu Text to the primary language fields (e.g., 'Dialogue Text' to 'en' and 'Menu Text' to 'Menu Text en').
Add the script Dialogue System Use I2 Language to the Dialogue Manager to automatically set the Dialogue System to use I2 Localization's current language in this script's Start method. Make sure I2 Localization has set its current language before this script's Start method starts. To verify that the Dialogue System is using the correct language, inspect the Dialogue Manager's Localization Settings at runtime, or check Localization.language in a build.
If you change languages in I2 Localization, call the script's UseCurrentI2Language() method to inform the Dialogue System.
You can also tick Use I2 Language At Runtime to make the Dialogue System pull translations from I2 Localization at runtime. Currently this pulls Menu Text and Dialogue Text fields. Set the dropdowns to match the values you used in the DS To I2 window.
If your dialogue uses right-to-left (RTL) languages, add the script Dialogue System Use I2 RTL Fix to the Dialogue Manager. When displaying right-to-left content, it will apply I2 Localization's RTL fix, set subtitle typewriter effects to type right to left, and optionally set subtitle text to right-side alignment.