Knowledge Center next icon Language Detection and Content Translation
Nov 14, 2022
4 minutes read

Language Detection and Content Translation

Natural Language Processing (NLP) toggle

Conversational AI Cloud is able to automatically perform language detection on incoming end-user input and translate output to the end user's preferred language. Both language detection and content translation need to be enabled for your project in Conversational AI Cloud’s admin portal.

blob

Note: This is an add on package. Please contact your Account Manager if you'd like to use this feature.

Language Detection

When calling Conversational AI Cloud’s API with your end user’s input, we will be able to detect the language. If we detect a language different from the culture that was sent in for the interaction our content translation feature will be triggered.

Language detection is available for 176 languages, to name a few:

Language

ISO-code

Intent

Entity

Detection and Translation

English

en

Dutch

nl

French

fr

German

de

Italian

it

Spanish

es

Polish

pl

Ukranian

uk

Romanian

ro

Hungarian

hu

Slovak

sl

Czecch

cs

Swedish

sv

Danish

da

Norwegian

no

Portugese

pt

Serbo-croatian

sr,hr

Simplified Chinese

zh-cn

Traditional Chinese

zh-hk

Turkish

tr

Content Translation

If Conversational AI Cloud’s language detection features determine that the detected language is different from the project's culture, or the customer provides a language to translate input and output towards manually our content translation component will be triggered.

Automatic content translation based on language detection works in the following way:

  1. Translate the end-user's input to the language (read culture) of the Conversational AI Cloud project. An example scenario:
    1. The project's culture is set to “en”, representing English.
    2. User asks, “Bonjour comment ç ava?”.
    3. Our language detection detects that the input language is French.
    4. The culture is provided in English, so we translate the input to English.
    5. The translated result is “Hello how are you doing”.
  2. Perform recognition in the project’s culture using the translated end-user input.
  3. Conversational AI Cloud will generate a response based on the project's content.
    1. However, the response will be in English not French, as was provided by the end-user.
  4. We translate the full English response from Conversational AI Cloud back to the originally detected language.
    1. French in this example.
  5. The end-user receives a French answer, to his french question, asked in an English Conversational AI Cloud project.

As an alternative to automatic content translation based on language detection, you can choose to always have specific interactions with a specified language. This is done through a new parameter made available through our API called “inputLanguage”. This works in the following way:

  1. Translate the end-user's input to the language (read culture) of the Conversational AI Cloud project. An example scenario:
    1. The project's culture is set to "en" representing English.
    2. The "inputLanguage" parameter provided to Conversational AI Cloud's API is set to "fr".
    3. The culture provided is English, so we translate the input into English.
    4. The translated result is "Hello how are you doing".
  2. Perform recognition in the project's culture using the translated end-user input.
  3. Conversational AI Cloud will generate a response based on the project's content.
    1. However, the response will be in English not French, as was provided to Conversational AI Cloud's API.
  4. We translate the full English response from Conversational AI Cloud back to the originally provided input language.
    1. French in this example
  5. The end-user receives a French answer, to his French question, asked in an English Conversational AI Cloud project.

Side notes:

  • The language detection module works from 2 words onward so 3 words will be translated (including emojis)
  • When performing language detection and content translations our API format is extended. It is extended in a way so as to not result in breaking changes, making enabling this feature a safe action from a developer's point of view.
  • When performing language detection and content translations our API provides the detected language, and the original (non-translated) response from Conversational AI Cloud in our API response. This provides you, the customer, with a variety of potential use-cases such as translating content back and forth in your UI of choice, or providing language selection prompts.

Content translations are available in the following languages:

Language

ISO-code

Intent

Entity

Detection and Translation

English

en

Dutch

nl

French

fr

German

de

Italian

it

Spanish

es

Polish

pl

Ukranian

uk

Romanian

ro

Hungarian

hu

Slovak

sl

Czecch

cs

Swedish

sv

Danish

da

Norwegian

no

Portugese

pt

Serbo-croatian

sr,hr

Simplified Chinese

zh-cn

Traditional Chinese

zh-hk

Turkish

tr

Known Issues

🔎Translate module has incorrectly selected a language.
Example: User input that is in Dutch "auto die ik al had" gets detected as English and provides the answer in the wrong language. This answer should be shown in Dutch.

image.png

Cause: In this example, the sentence "auto die ik al had" is being classified as English with high confidence (most of the words in the sentence appear to be English).

The field of natural language processing and machine translation is dynamic, with continuous improvements and updates being made to models.

Also remember that the language detection module works from 2 words onward, so 3 or more words will be translated (including emojis).

group icon
Get support

Can’t find the answer you are looking for?
Ask for the help of our chatbot, or get in touch with our support team.

Contact Support
Is this region a better fit for you?
Go
close icon