# Internationalization

Configure the chat widget's UI language using the `locale` option.

## Automatic Language Detection

By default, Alhena uses the `lang` attribute from your HTML tag:

```html
<html lang="es">
```

If your page has `lang="es"`, the widget UI will display in Spanish.

## Explicit Locale Configuration

To override automatic detection, set the `locale` in your configuration:

```html
<script>
document.gleenConfig = {
    company: 'your-company-key',
    apiBaseUrl: 'https://app.alhena.ai',
    locale: 'es'
};
</script>
<script src="https://app.alhena.ai/sdk/gleenWidget.js"></script>
```

Use standard [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes (e.g., `en`, `es`, `fr`, `de`).

## Related

* [JavaScript API](/docs/developer-reference/website-sdk/javascript-api.md) - Configuration reference


---

# 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://alhena.gitbook.io/docs/developer-reference/website-sdk/examples/internationalization.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.
