Make CMS control language

Please note that this is no longer being updated. Kindly visit the new Cookiebot support area (https://support.cookiebot.com/hc/en-us) for updated guides, articles and FAQs. If you do not find the answer to your question there, you are welcome to post it in the Cookiebot community (https://support.cookiebot.com/hc/en-us/community/topics).

If you operate a website with content pages in different languages, you can lock the language of the consent banner and cookie declaration by dynamically assigning the current page language to the Cookiebot script tags.

When the attribute 'data-culture' is applied to the Cookiebot script tags, the banner and declaration will display in the language defined in the attribute value as a two-letter ISO language-code.

To set the language dynamically by your content management system (CMS), use the built in CMS function to get the language of the current page.
Example on implementing language match in Wordpress CMS header template file:

<?php $curLang = substr(get_locale()), 0, 2); ?>

<script id="Cookiebot" data-culture="<?php echo $curLang?>" src="https://consent.cookiebot.com/uc.js" data-cbid="00000000-0000-0000-0000-000000000000" type="text/javascript" async></script>

In the Cookiebot manager you must create a language variant for each language used on your website. If no language variant has been created for the language applied in data-culture, the language of the banner and declaration will show in the default language selected in the Cookiebot manager. 

Using the data-culture attribute overrides the configuration of default language and auto-detection of the individual user's preferred language.

Feedback and Knowledge Base