How does the banner detect languages?
The cookie banner by default uses the browser language of the visitor. This behaviour can be overridden by using data attributes.
How does the banner determine which language to show? There is an order to how it's decided to show which language:
- if language switcher is enabled, use the language remembered from previous user choice in the switcher
- if client added language attribute to banner, and set it to
inherit, use the language defined on <html> element - if client added language attribute
data-language="fr"to banner and set it to a language, use that language - detect browser language and try to use that
- use the fallback language (first on in the list in our portal) if none of the above managed to determine a language for the banner
