How does the banner detect languages?

Have more questions? Submit a request

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:

  1. if language switcher is enabled, use the language remembered from previous user choice in the switcher
  2. if client added language attribute to banner, and set it to inherit , use the language defined on <html> element
  3. if client added language attribute data-language="fr"  to banner and set it to a language, use that language
  4. detect browser language and try to use that
  5. 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

Articles in this section

Was this article helpful?
3 out of 5 found this helpful