Skip to main content
The public site is seen by guests and by signed-in users. A good header tells them apart, and gets people into the application quickly.

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. 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:
Keep this light. The landing page is a marketing page, and account details belong in the app.

The language switcher

Languages come from locales, and the current one from locale. Each enabled language is reachable at a URL prefix:
Setting the cookie is what makes the choice stick on pages without a 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.
Themes register routes with an optional [locale:locale]? segment so their pages work under a prefix. See Custom pages.

Right-to-left languages

Use logical CSS properties, such as Tailwind’s ms-*, me-*, ps-* and pe-*, rather than left and right, so an RTL language lays out correctly.