> For the complete documentation index, see [llms.txt](https://doc.dastra.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.dastra.eu/en/features/cookies/integration/languages.md).

# Language management

This page explains how to manage the languages of the consent banner.

## Add languages to the banner

1. In the menu, click **Cookie consent** > **Banners**, then click your banner.
2. Expand the **Texts and localizations** section.
3. Click **Add a language**, choose the language in the list, then click **Add a language**.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-40fc8a4b121341b17c7b855616ea0f2573bd5588%2Fcookies-languages-1.png?alt=media" alt="The Texts and localizations section with the list of banner languages and their badges"><figcaption><p>The "Texts and localizations" section</p></figcaption></figure>

The first language in the list is the default language. To choose another one, click **Set as default** next to the language. Click **Edit** to adapt the texts of a language.

In the selection list, the languages in the **Translated languages** group are already translated by Dastra: English (US), English (UK), French, German, Spanish, Italian, Dutch, Greek, Polish and Portuguese. The other languages are in the **Not translated languages** group: you enter the texts yourself.

Each language you add carries a badge:

* **Pre-translated**: the language is one of those Dastra translates;
* **Need translation**: some texts of the language are still empty;
* **Fully translated**: all the texts are filled in.

A counter shows the number of custom texts out of the total number of texts.

## How is the banner language detected?

By default, the banner uses the language set by the `lang` attribute of the page's `<html>` tag. If this attribute is missing, it uses the browser language.

If this language (or its main language, for example `fr` for `fr-FR`) is not in the banner's list, the banner appears in the first language of the list.

## How to force the language of the banner?

To force the language, add the `data-lang` attribute to the banner's `div`:

```html
<div id="dastra-cookie-consent" data-widgetid="{your_widget_id}" data-lang="fr"></div>
```

If you load the banner with the `loadCookieConsent` method, pass the `lang` option instead:

```javascript
dastra.push(['loadCookieConsent', {
    widgetId: {your_widget_id},
    selector: '#cookie-consent',
    lang: 'fr'
}]);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.dastra.eu/en/features/cookies/integration/languages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
