Hello there,
As I mentioned in the title, how can we integrate translation systems such as Google Translate, Yandex Translate or Microsoft Translator into our game in an easy way? Do you plan to bring such an update?
Thanks.
How to use translation API to work with Dialogue System?
Re: How to use translation API to work with Dialogue System?
Hi,
To translate dialogue text, add a script to the Dialogue Manager that has OnConversationLine and OnConversationResponseMenu methods. For example:
The LocalizeUI component is used to localize non-Dialogue System text, such as menu buttons. You can make a subclass of LocalizeUI and override the UpdateText() method to get the text from your translation system.
To translate dialogue text, add a script to the Dialogue Manager that has OnConversationLine and OnConversationResponseMenu methods. For example:
Code: Select all
void OnConversationLine(Subtitle subtitle)
{
subtitle.formattedText.text = YourTranslationAPI(subtitle.formattedText.text);
}
void OnConversationResponseMenu(Response[] responses)
{
foreach (Response response in responses)
{
response.formattedText.text = YourTranslationAPI(response.formattedText.text);
}
}
The LocalizeUI component is used to localize non-Dialogue System text, such as menu buttons. You can make a subclass of LocalizeUI and override the UpdateText() method to get the text from your translation system.
Re: How to use translation API to work with Dialogue System?
Hello, thanks for the info. But I need more details. Is there a more detailed explanation, documentation or video on how to integrate automatic translation systems into the Dialogue System?
Re: How to use translation API to work with Dialogue System?
Hi,
What other information can I provide? What else do you need to know?
What other information can I provide? What else do you need to know?
Re: How to use translation API to work with Dialogue System?
Hi,
How can I integrate Google Translate for example? It will be automatically translated from English to other languages
How can I integrate Google Translate for example? It will be automatically translated from English to other languages
Re: How to use translation API to work with Dialogue System?
In my example code above, you could replace "YourTranslationAPI" with whatever call you need to make to get the translation (e.g., from Google Translate or wherever).