Internationalization (i18n)¶
listmonk comes available in multiple languages thanks to language packs contributed by volunteers. A language pack is a JSON file with a map of keys and corresponding translations. The bundled languages can be viewed here.
Additional language packs¶
These additional language packs can be downloaded and passed to listmonk with the --i18n-dir flag as described in the next section.
| Language | Description |
|---|---|
| Deutsch (formal) | German language with formal pronouns |
Customizing languages¶
To customize an existing language or to load a new language, put one or more .json language files in a directory, and pass the directory path to listmonk with the--i18n-dir=/path/to/dir flag.
Contributing a new language¶
Using the basic editor¶
- Visit https://listmonk.app/i18n
- Click on
Createa new language, or to make changes to an existing language, useLoad language. - Translate the text in the text fields on the UI.
- Once done, use the
Download raw JSONto download the language file. - Send a pull request to add the file to the i18n directory on the GitHub repo.
Using InLang (external service)¶
- Visit https://inlang.com/editor/github.com/knadh/listmonk
- To make changes and push them, you need to log in to GitHub using OAuth and fork the project from the UI.
- Translate the text in the input fields on the UI. You can use the filters to see only the necessary translations.
- Once you're done, push the changes from the UI and click on "Open a pull request." This will take you to GitHub, where you can write a PR message.
Maintaining translation keys¶
Use globals.fields for reusable field labels and globals.terms for shared nouns. Generic actions and messages belong in globals.buttons and globals.messages.
Run python3 scripts/check-i18n.py to audit the codebase for i18n key parity.
Dates and counts¶
The metadata keys _.date_long and _.date_short use Go time layouts, such as 02 January 2006 and Mon 02 Jan 2006. DO NOT translate 'Mon', 'January' etc. and only reorder them in the string to suit the locale.
dates.months and dates.monthsShort contain 12 | separated names starting with January. dates.weekdays and dates.weekdaysShort contain seven | separated names starting with Sunday. Translate the names while preserving their order.