Guest or signed in
sections/header.twig
user is only defined for signed-in visitors, and debug mode errors on undefined variables, so the is defined check isn’t optional.
Links into the application
Policy pages exist only when the administrator filled them in, so link conditionally:
Showing workspace details
For a signed-in visitor you can show the current workspace, its plan and its credits:The language switcher
Languages come fromlocales, and the current one from locale. Each enabled language is reachable at a URL prefix:
How the language is resolved
1
URL prefix
/de-DE/... wins, if that language is enabled.2
The signed-in user's language
Their account preference.
3
The locale cookie
What the switcher set.
4
Accept-Language
The browser’s preference.
5
The default language
Configured in the admin panel.
[locale:locale]? segment so their pages work under a prefix. See Custom pages.
Right-to-left languages
ms-*, me-*, ps-* and pe-*, rather than left and right, so an RTL language lays out correctly.