dev only
Internationalization
FR/EN multilingual support with locale switching and scroll restoration.
Translation files
The boilerplate supports French and English. The locale is detected from the URL and persisted in the session.
| File | Language |
|---|---|
translations/messages.fr.yaml | Français |
translations/messages.en.yaml | English |
Switching language
To switch language, the user goes through the locale switch route. The scroll position is automatically restored after the redirect.
/locale/fr
Adding a new language
To add a locale (e.g. German):
- 1
Create the translation file:
translations/messages.de.yaml - 2
Declare the locale in the configuration:
config/packages/translation.yaml