Localization
Overleaf i18 Configuration
Overleaf has been translated into multiple languages. With the appropriate configuration, you can:
Run your Overleaf instance in a single fixed language, or
Enable multiple languages, allowing users to switch languages dynamically, similar to
www.overleaf.com.
Single Language Configuration
The site language is configured using the environment variable OVERLEAF_SITE_LANGUAGE(or SHARELATEX_SITE_LANGUAGE for Overleaf versions 4.x and earlier).
Supported language codes include:
en- English (default)es- Spanishpt- Portuguesede- Germanfr- Frenchcs- Czechnl- Dutchsv- Swedishit- Italiantr- Turkishzh-CN- Chinese (simplified)no- Norwegianda- Danishru- Russianko- Koreanja- Japanesepl- Polishfi- Finnish
English is the default language. To change the interface language (for example, to Simplified Chinese), add the following line to config/variables.env:
Then apply the configuration:
After the services restart, the interface language in the web UI menus should reflect the new setting.
Multiple Language Configuration
To allow users to switch languages without logging out, your Overleaf instance must be configured to serve different languages based on domain names.
This section assumes:
Your primary domain is
overleaftest.comYou have a wildcard TLS certificate (e.g.
*.overleaftest.com)You are not using
localhost(since it cannot support subdomain-based language routing)
For local testing, you may use a domain such as dev-overleaf.com.
Language–Domain Mapping
Next, define how language codes map to subdomains using
OVERLEAF_LANG_DOMAIN_MAPPING.
Example Configuration
With this configuration:
https://www.overleaftest.com→ English interfacehttps://cn.overleaftest.com→ Simplified Chinese interface
You can extend this mapping with additional languages and subdomains as needed.
Last updated
Was this helpful?