Variable ["Alert"] Is it possible to translate?
Variable ["Alert"] Is it possible to translate?
I would like to have a different message for each country.
- Attachments
-
- 1.png (39.71 KiB) Viewed 766 times
Re: Variable ["Alert"] Is it possible to translate?
Yes. Alert text isn't considered dialogue text, so the translations for alert text need to be in a localized text table assigned to the Dialogue Manager's Display Settings > Localization Settings > Localized Text.
If the localized text table has a field for "ABCD", then the alert will automatically use the language-specific version of that field.
If the localized text table has a field for "ABCD", then the alert will automatically use the language-specific version of that field.
Re: Variable ["Alert"] Is it possible to translate?
Are you talking about this menu?
- Attachments
-
- 2.png (27.91 KiB) Viewed 761 times
Re: Variable ["Alert"] Is it possible to translate?
No. To localize alerts and non-dialogue UI elements, you'll use a different type of asset file called a Localized Text Table, not a dialogue database. The Localized Text Table's inspector looks like this:
and this:
After creating the Localized Text Table, remember to assign it to the Dialogue Manager.
and this:
After creating the Localized Text Table, remember to assign it to the Dialogue Manager.
Re: Variable ["Alert"] Is it possible to translate?
Dialogue System: Lua code 'LocalizedTextTable[abcd];' threw exception 'Lookup of field '' in the table element failed because the table element itself isn't in the table.'
- Attachments
-
- 3.png (81.12 KiB) Viewed 754 times
Re: Variable ["Alert"] Is it possible to translate?
You only need this Script field:
Because you assigned a Localized Text Table to the Dialogue Manager, it will automatically look up "ABCD" and use the translation.
Code: Select all
Variable["Alert"] = "ABCD"