2021-04-18 15:31:15 +00:00
---
2022-01-29 22:37:23 +00:00
title: Translations
2021-04-18 15:31:15 +00:00
---
Translation in authentik is done in two places. Most of the text is defined in the frontend in `web/` , and a subset of messages is defined in the backend.
2023-06-06 10:32:32 +00:00
The frontend uses [@lit/localize ](https://lit.dev/docs/localization/overview/ ), and the backend uses the built-in django translation tools.
2021-04-18 15:31:15 +00:00
2022-01-29 22:37:23 +00:00
:::info
Please review the [Writing documentation ](./docs/writing-documentation ) guidelines as they apply to documentation too.
:::
2021-08-10 19:41:36 +00:00
## Online translation
2021-04-18 15:31:15 +00:00
2022-11-06 16:36:02 +00:00
To simplify translation you can use https://www.transifex.com/authentik/authentik, which has no local requirements.
2021-08-10 19:41:36 +00:00
## Local translation
### Prerequisites
2022-05-09 19:22:41 +00:00
- Node (any recent version should work, we use 16.x to build)
- Make (again, any recent version should work)
- Docker
2021-08-10 19:41:36 +00:00
2021-08-15 19:32:17 +00:00
Run `npm i` in the `/web` folder to install all dependencies.
2021-08-10 19:41:36 +00:00
2023-06-06 10:32:32 +00:00
Ensure the language code is in the `lit-localize.json` file in `web/` :
2021-04-18 15:31:15 +00:00
```json
// [...]
2023-06-06 10:32:32 +00:00
"targetLocales": [
"en",
"pseudo-LOCALE",
"a-new-locale"
2021-04-18 15:31:15 +00:00
// [...]
2023-06-06 10:32:32 +00:00
],
2021-04-18 15:31:15 +00:00
// [...]
```
2023-06-06 10:32:32 +00:00
Afterwards, run `make web-i18n-extract` to generate a base .xlf file.
2021-04-18 15:31:15 +00:00
2023-06-06 10:32:32 +00:00
The .xlf files can be edited by any text editor, or using a tool such as [POEdit ](https://poedit.net/ ).
2021-04-18 15:31:15 +00:00
2023-06-06 10:32:32 +00:00
To see the change, run `make web-watch` in the root directory of the repository.