Multilanguage


To make your bot multilingual and optimize its performance, you need to access the advanced settings of your specific bot. Follow these steps:

1. How to access the settings

Navigate to "Bots": In the left-hand sidebar menu, click on the "Bots" module under the "Modules" section.

Select your Bot: In the list of your bots, locate the bot you want to configure.

Click Edit

Open the advanced tab: A configuration window will appear. In the left-hand menu of this window, you will find the following tab Additional Treatments

Open the "Translation" tab: In the configuration window that opens, click on the Translation tab in the left menu (located just below NLU).
Note: If your bot is multilingual, you will see sub-tabs for each language (e.g., English, French).

2. Dialects and Custom Dictionary

A. Regional Languages & Dialect Support (Smartly LLM)

This is a critical feature for markets where users speak local dialects rather than formal language.

  1. How it works: Enable the "Regional languages & Dialect support" toggle.
  2. The Advantage: Unlike standard translators (which often fail at slang or dialects), this uses Smartly.ai’s proprietary models optimized for Moroccan Darija, Tunisian Arabic, Tamazight, etc..
  3. Best Practice: Always enable this if your target audience uses local dialects to ensure they feel understood.

B. Translation Dictionary (Glossary)

The Translation Dictionary gives you manual control over specific terms.

  1. Purpose: Prevent the AI from translating brand names, technical jargon, or specific company terms (e.g., ensuring "Smartly" stays "Smartly" in every language).

  2. Management: You can download a template and Import/Export CSV files containing your custom word pairs.

3. AI Translation Configuration

A. AI Model Selection

  • Select your model: Choose the specific AI engine (e.g., Azure OpenAI GPT-4o) that will perform the translations.

B. Directional Translation

  • Translate user messages: Translates the user's input into the bot's native language (the "Graph Language") before it reaches the NLU. This allows one single intent structure to work for all languages.
  • Translate the bot response: Translates the bot's reply back into the user's detected language, ensuring a fluid, natural conversation.

4. Custom Instructions (System Prompts)

You can fine-tune the "personality" and accuracy of the translation using the Open Editor buttons for both User and Bot messages:

  • User Message Instructions: Example: "Ignore spelling mistakes" or "Always treat informal 'tu' as formal 'vous'."

  • Bot Response Instructions: Example: "Maintain a professional and polite tone" or "Never translate URLs, prices, or product names found in brackets."

5. Expert Mode: Skip Language Detection & Forcing

The "Skip Language Detection" option is used when you want to bypass the automatic detection (for example, if you already know the user's preference through your web interface).

How to Force a Specific Translation Language

  • Variable to use: user_data.preferred_language
  • Best Practice for Language Codes: Always use the full ISO language format (e.g., fr-fr, en-us) instead of generic codes like fr or ar.
  • 💡 Performance Optimization: Using the full ISO code (such as fr-fr instead of fr) allows the system to behave more intelligently:
    • If the forced language matches the bot’s native graph language (e.g., the user selects French while the bot is running on a fr-fr graph), the system automatically bypasses the translation process.
    • Translation is triggered only when the user’s language differs from the graph language.
    • This approach avoids unnecessary translation calls and ensures faster response times and better performance.
  • Setup in the Builder (Graph):
    1. Add a NodeJS or Code node at the very beginning of your conversation path.
    2. Set the full ISO language code for the desired language.
      Code Example : user_data.preferred_language= "fr-fr";