AI - Translation
In an international world, you may frequently want to converse with your users in their own language. To assist with this, our AI powered Translation tasks can both detect a users language, and translate messages from one language to another.
There are two sub-tasks available in the Translation action:
Detect Language - determine what language a given piece of text is written in
Translate Text - translate text from one language to another
Detect Language
The "Detect Language" task is extremely simple. Give it a piece of text, it will tell you the language.
The outputs are:
Language - the name of the language the text is written in
Language Code - the standardized language code of the language
Confidence - how certain is the model about its guess?
You can use this task in combination with Translate Text to write back to a user in the same language they wrote to you with!
Translate Text
Translate text is a task that, as the name suggests, translates a piece of text from the language it is written in into the language you want it to be.
This task has only two required inputs:
Text - what is the text you want translated?
Target Language Code - the language code of the language to translate to. You can get this from the Detect Language task if you don't know it already.
And, optionally, you can provide the Source Language Code if you happen to know what it is. For instance, if your bot is always written in English, you can use "en" as the source language code. This is optional, the source language code will be guessed if you don't provide it.
Here it is in action:
And that's it!
Happy Flowing!