DÉMO
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.

FileLanguage
translations/messages.fr.yamlFrançais
translations/messages.en.yamlEnglish

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. 1

    Create the translation file:

    translations/messages.de.yaml
  2. 2

    Declare the locale in the configuration:

    config/packages/translation.yaml
Loading…
Loading the web debug toolbar…
Attempt #