> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/on-premises/nl/configuratie/overleaf-toolkit/localization.md).

# Lokalisatie

### Overleaf i18-configuratie

{% hint style="info" %}
Dit document beschrijft hoe internationalisatie (i18n) te configureren voor een zelfgehoste **Overleaf** instantie.
{% endhint %}

Overleaf is vertaald in meerdere talen. Met de juiste configuratie kunt u:

* Draai uw Overleaf-instantie in **één vaste taal**, of
* Schakel **meerdere talen**, zodat gebruikers dynamisch van taal kunnen wisselen, vergelijkbaar met `www.overleaf.com`.

***

#### Configuratie voor één taal

De sitetaal wordt geconfigureerd met behulp van de omgevingsvariabele `OVERLEAF_SITE_LANGUAGE`(of `SHARELATEX_SITE_LANGUAGE` voor Overleaf-versies **4.x en eerder**).

Ondersteunde taalcodes zijn onder andere:

* `en` - Engels (standaard)
* `es` - Spaans
* `pt` - Portugees
* `de` - Duits
* `fr` - Frans
* `cs` - Tsjechisch
* `nl` - Nederlands
* `sv` - Zweeds
* `it` - Italiaans
* `tr` - Turks
* `zh-CN` - Chinees (vereenvoudigd)
* `no` - Noors
* `da` - Deens
* `ru` - Russisch
* `ko` - Koreaans
* `ja` - Japans
* `pl` - Pools
* `fi` - Fins

Engels is de standaardtaal. Om de interfacetaal te wijzigen (bijvoorbeeld naar Vereenvoudigd Chinees), voegt u de volgende regel toe aan `config/variables.env`:

{% code title="config/variables.env" %}

```bash
OVERLEAF_SITE_LANGUAGE=zh-CN
```

{% endcode %}

Pas vervolgens de configuratie toe:

```bash
bin/up
```

Nadat de services opnieuw zijn gestart, zou de interfacetaal in de menu's van de web-UI de nieuwe instelling moeten weergeven.

#### Configuratie voor meerdere talen

Om gebruikers in staat te stellen **van taal te wisselen zonder uit te loggen**, moet uw Overleaf-instantie zo geconfigureerd zijn dat verschillende talen worden aangeboden op basis van domeinnamen.

Deze sectie gaat ervan uit dat:

* Uw hoofddomein is `overleaftest.com`
* U hebt een **wildcard-TLS-certificaat** (bijv. `*.overleaftest.com`)
* U gebruikt **geen `localhost`** (omdat het geen taalroutering op basis van subdomeinen ondersteunt)

Voor lokale tests kunt u een domein gebruiken zoals `dev-overleaf.com`.

{% stepper %}
{% step %}

### TLS-proxyconfiguratie (Nginx)

Uw TLS-reverseproxy moet de oorspronkelijke `Host` header doorsturen, zodat Overleaf kan bepalen welk taaldomein de gebruiker heeft bezocht.

Zorg ervoor dat de volgende directive aanwezig is:&#x20;

```nginx
proxy_set_header Host $host;
```

Hier is een voorbeeld-Nginxconfiguratie:&#x20;

<pre class="language-nginx"><code class="lang-nginx">server {
    listen 443 ssl;
    server_name    _; # vang alles op, zie http://nginx.org/en/docs/http/server_names.html
    server_name *.overleaftest.com;
    ssl_certificate /etc/nginx/ssl/nginx.crt;
    ssl_certificate_key /etc/nginx/ssl/nginx.key;
    ssl_protocols               TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers   on;
    # gebruikt de ciphers van Cloudflare https://github.com/cloudflare/sslconfig/blob/master/conf
    ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;

    # configuratie om HSTS(HTTP Strict Transport Security) in te schakelen https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security
    # om ssl-stripping te voorkomen https://en.wikipedia.org/wiki/SSL_stripping#SSL_stripping	
    add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
    server_tokens off;
    add_header X-Frame-Options SAMEORIGIN;
    add_header X-Content-Type-Options nosniff;
    client_max_body_size 50M;

    location / {
        proxy_pass http://localhost:5000; # wijzig naar de host/poort waarop de Docker-container luistert.
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_read_timeout 3m;
        proxy_send_timeout 3m;
        
        # voeg dit toe aan uw nginx-configuratie
<strong>        proxy_set_header Host $host;
</strong>    }
}
</code></pre>

{% endstep %}

{% step %}

### Cookie-domein configureren

Om te voorkomen dat gebruikers worden uitgelogd bij het wisselen van taal, moeten cookies gedeeld worden tussen taal-subdomeinen.

Voeg de volgende regel toe aan `config/variables.env`:

{% code title="config/variables.env" %}

```env
# Let op de punt aan het begin
COOKIE_DOMAIN=.overleaftest.com
```

{% endcode %}

Dit zorgt ervoor dat authenticatiecookies geldig zijn voor alle subdomeinen onder `overleaftest.com`.
{% endstep %}

{% step %}

### Taal-domeinmapping

Definieer vervolgens hoe taalcodes worden gekoppeld aan subdomeinen met\
`OVERLEAF_LANG_DOMAIN_MAPPING`.

#### Voorbeeldconfiguratie

{% code title="config/variables.env" overflow="wrap" %}

```dotenv
OVERLEAF_LANG_DOMAIN_MAPPING='{"www": {"lngCode": "en","url": "https:\/\/www.overleaftest.com"},"cn": {"lngCode": "zh-CN","url": "https:\/\/cn.overleaftest.com"}}'
```

{% endcode %}

Met deze configuratie:

* `https://www.overleaftest.com` → Engelse interface
* `https://cn.overleaftest.com` → Interface in Vereenvoudigd Chinees

U kunt deze mapping uitbreiden met extra talen en subdomeinen indien nodig.
{% endstep %}

{% step %}

### Verwijs het apex-domein door

Verwijs ten slotte het apex-domein (`overleaftest.com`) door naar het standaardtaaldomein (`www.overleaftest.com`).

<pre class="language-nginx"><code class="lang-nginx">server{
    listen 80;
    server_name overleaftest.com;
<strong>    return 301 https://www.overleaftest.com$request_uri;
</strong>}

server {
    listen 443 ssl http2;
    server_name overleaftest.com;
    ssl_certificate     /<a data-footnote-ref href="#user-content-fn-1">p</a>ath/to/fullchain.cer;
    ssl_certificate_key /path/to/overleaftest.com.key;
<strong>    return 301 https://www.overleaftest.com$request_uri;
</strong>}
</code></pre>

{% endstep %}
{% endstepper %}

[^1]:


---

# 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 dynamically by asking a question.

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

```
GET https://overleaf-pro.ayaka.space/on-premises/nl/configuratie/overleaf-toolkit/localization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
