Information & support > Knowledge base > Language Settings >Laatst bijgewerkt opMarch 12, 2021When you operate a multilingual website and would like to have the cookie banner displayed in the same language as your website (E.g. English for “mywebsite.com/en” and Spanish for “mywebsite.com/es”) you can use the data-culture attribute.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 (manual blocking mode):<?php $curLang = substr(get_locale()), 0, 2); ?> <script id="CookieConsent" data-culture="<?php echo $curLang?>" src="https://consent.cookiebot.com/uc.js" data-cbid="00000000-0000-0000-0000-000000000000" type="text/javascript" async></script>Example on implementing language match in WordPress CMS header template file (automatic blocking mode):<?php $curLang = substr(get_locale()), 0, 2); ?> <script id="CookieConsent" data-culture="<?php echo $curLang?>" src="https://consent.cookiebot.com/uc.js" data-cbid="00000000-0000-0000-0000-000000000000" data-blockingmode="auto" type="text/javascript"></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.14 day free trial CookiebotCookie scanner, cookie banner, cookie declaration and cookie consent in one solution.Use cookies on your website compliant with GDPR, ePrivacy and cookie legislationCookie management completely automatedCookie banner based on your corporate identityAutomatic composed cookie declaration, always up to dateStart 14 day free trialThe Cookiebot solution runs on 2,3 million websites, manages 7 billion monthly User Consents and supports 47+ languages.Previous Facebook Twitter LinkedIn E-mailNext
Laatst bijgewerkt opMarch 12, 2021When you operate a multilingual website and would like to have the cookie banner displayed in the same language as your website (E.g. English for “mywebsite.com/en” and Spanish for “mywebsite.com/es”) you can use the data-culture attribute.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 (manual blocking mode):<?php $curLang = substr(get_locale()), 0, 2); ?> <script id="CookieConsent" data-culture="<?php echo $curLang?>" src="https://consent.cookiebot.com/uc.js" data-cbid="00000000-0000-0000-0000-000000000000" type="text/javascript" async></script>Example on implementing language match in WordPress CMS header template file (automatic blocking mode):<?php $curLang = substr(get_locale()), 0, 2); ?> <script id="CookieConsent" data-culture="<?php echo $curLang?>" src="https://consent.cookiebot.com/uc.js" data-cbid="00000000-0000-0000-0000-000000000000" data-blockingmode="auto" type="text/javascript"></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.