Files
authentik/website/docs/developer-docs/translation.md
T
Dominic R 0e56195c82 website: Fix broken schema links, non-relative paths, unapplied redirect aliases (#16900)
* website: fix broken schema links

* website: Use download links.

* website: Use env constants for URLs.

* website: Add schema redirects.

* website: Use path alias for integrations.

* website: Use docs alias in integrations.

* website: Use relative links, better dead-link checking.

* website: Fix nested docs prefix affecting redirects. Add aliases.

* website: Remove hard links.

* website: Replace hardcoded edit URL with environment URL.

---------

Co-authored-by: Teffen Ellis <teffen@goauthentik.io>
2025-09-21 14:32:26 -04:00

1.6 KiB

title
title
Translations

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 @lit/localize, and the backend uses the built-in django translation tools.

:::info Please review the Writing documentation guidelines as they apply to documentation too. :::

Online translation

To simplify translation you can use https://www.transifex.com/authentik/authentik, which has no local requirements.

Local translation

Prerequisites

  • Node (any recent version should work, we use 16.x to build)
  • Make (again, any recent version should work)
  • Docker

Frontend

Run npm i in the /web folder to install all dependencies.

Ensure the language code is in the lit-localize.json file in web/:

    // [...]
    "targetLocales": [
        "en",
        "pseudo-LOCALE",
        "a-new-locale"
        // [...]
    ],
    // [...]

Afterwards, run make web-i18n-extract to generate a base .xlf file.

The .xlf files can be edited by any text editor, or using a tool such as POEdit.

To see the change, run make web-watch in the root directory of the repository.

Backend

Backend translations are handled by core-i18n-extract.

Use Django's translation utility to declare the string, e.g.:

from django.utils.translation import gettext as _

_("New text to be translated.")

Afterwards, run make core-i18n-extract to generate the updated translation files.