This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/website/developer-docs/translation.md
Jens Langhammer a074ea70e9 website/docs-dev: add initial translation docs
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
2021-04-18 17:31:15 +02:00

30 lines
847 B
Markdown

---
title: Translation
---
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.
The frontend uses [lingui](https://lingui.js.org/), and the backend uses the built-in django translation tools.
## Frontend
If you want to translate the frontend to a new language, ensure the language code is in the `package.json` file in `web/`:
```json
// [...]
"lingui": {
// [...]
"locales": [
"en",
"pseudo-LOCALE",
"a-new-locale"
],
// [...]
```
Afterwards, run `npx lingui extract` to generate a base .po file.
The .po files can be edited by any text editor, or using a tool such as [POEdit](https://poedit.net/).
To see the change, run `npm run watch` in the `web/` directory.