# Language Translation

We recognise that different people may want to interact with your bot in different languages and because of that we offer both static and dynamic language translation that can be triggered at any point in the conversation.&#x20;

![](/files/XcjDtKtDEhkCTLRDMeP5)

As you can see from this example, here we are getting responses in English first, but then after typing "I need help" in Welsh we then start to get responses from the bot in that language.&#x20;

## Providing Translations

The first option for this is around providing `static translations` for the bots responses. These are provided inside IntelAgent and you'd provide an alternate response for every bot response or training phrase.

The alternative is to use dynamic translations that will detect the language used in the users utterance and then translate any responses from the bot before replying back to the user. You can further restrict this to a specific subset of languages if you want to be cautious around how the bot responds.&#x20;

## Default Language

By default the language will be English however if you wish you can change the language for the widget and the bot using a parameter.&#x20;

{% tabs %}
{% tab title="Setting the language" %}

```javascript
window.addEventListener('wbb_plugin_loaded', function(event) {
  new window.WBBChatPlugin({
    // Other settings here...
    
    // Language
    language: getQueryParam("lang") || "en",
    
    // more settings as required...
  });
});
```

{% endtab %}
{% endtabs %}

In the example above we can use the optional [URL parameter](/additional-features/using-parameters-in-the-url.md) `lang` to determine what we pass into the widget as options. Alternatively the `language` parameter passed to the settings will be set to `en`.

The language codes that you can use can be found on the [Google Documentation site](https://cloud.google.com/translate/docs/languages).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chat-plugin.logicdialog.ai/additional-features/language-translation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
