Translate

Transletto Icon

Translate a text using various translation APIs

Author

André da Glória Santiago, Sébastien Franzone, Marie Fasel, (Klisman Kodra)

Signals

Input:

  • Segmentation

    A text segmentation to be translated.

Outputs:

  • Translated data

    A translated text segmentation.

Description

This widget takes a text segmentation as input and translates it into a specified target language using one of the available translation services. The translation services currently supported include GoogleTranslator, DeepL, QCRI, MyMemory, Linguee, and Pons.

The widget’s interface allows users to select the input language manually or enable automatic language detection. Users can also select the desired output language and choose the translation service to be used.

Interface

The widget’s interface requires the following user inputs (see figure 1 below):

  1. Input language: The language of the input text. This can be set manually or automatically detected using the “Auto-detect” button

  2. Output language: The language into which the text will be translated.

  3. Translation service: The service to be used for translation (e.g., GoogleTranslator, DeepL, QCRI, MyMemory, Linguee, Pons).

  4. API Key: In some instances, such as with DeepL and QCRI, an API key is required. Ensure you have the necessary API keys and enter them in the appropriate field.

  5. Reset button: This button resets the interface to its default settings (GoogleTranslator as the translation service, and English as the default input and French as the output language).

Interface of the Translate widget

Figure 1: Transletto widget interface.

The Info section indicates that the input has been correctly processed or the reason why no output is emitted (e.g., no input, error in the translation process).

The Send button triggers the translation and sends the translated text to the output connection. When the Send automatically checkbox is selected, the widget will attempt to automatically emit results whenever its interface is modified.

Messages

Information

Segments sent to output.

This confirms that the widget has operated properly and the translation is complete.

Warnings

Settings were changed, please click ‘Send’ when ready.

Settings have changed, but the Send automatically checkbox has not been selected, so the user is prompted to click the Send button (or check the box) to proceed with translation and data emission.

Widget needs input

A text segmentation should be input into the widget for translation.

Errors

Translation failed

An error occurs when the translator cannot complete the translation. Please try changing the translation service or languages.