Translations¶
Userli is available in English, German, Spanish, French, Italian, Portuguese, Norwegian Bokmål and Swiss German.
Translate on Weblate¶
All languages except English and German are translated on Weblate. You don't need to know Git or PHP – create a Weblate account and start translating. The maintainers merge the translations into the repository.
To add a new language, start it on Weblate and open an issue so that it can be added to the language switcher.
English and German¶
English and German are maintained directly in the repository:
default_translations/
├── en/
│ ├── messages.en.yml UI and email texts
│ └── validators.en.yml Validation messages
└── de/
├── messages.de.yml
└── validators.de.yml
When you add or change a user-facing text:
- Add the key to
messages.en.ymlandmessages.de.yml. -
Use the key in templates with the
|transfilter:{{ 'welcome.invitations.headline'|trans }} {{ 'welcome.invitations.text'|trans({'%limit%': limit, '%waitingPeriodDays%': days}) }} -
In PHP, use the
TranslatorInterfaceor pass translation keys to flash messages and constraints.
Never hard-code user-facing text in templates or code. Weblate picks up new English keys for the other languages automatically.
Overriding texts in an installation¶
Operators can override texts without changing the code, see Customization.