Limiting the Cookie declaration to a specific language with Google Tag Manager

Besides the cookiebanner you can set the language for the cookie declaration (policy) as well.

When you operate a multilingual website and would like to have the cookie declaration displayed in the same language as your website you can use the data-culture attribute.

In this example, the language is set to  Spanish:

var contentPlaceholder = document.getElementById("bodycontent");

var cookieDeclarationScript = document.createElement("script");

cookieDeclarationScript.type = "text/javascript"; = "CookiePolicy";

cookieDeclarationScript.src = "";

cookieDeclarationScript.setAttribute("data-culture", "es");



14 day free trial Cookiebot

Cookie scanner, cookie banner, cookie declaration and cookie consent in one solution.

  • Use cookies on your website compliant with GDPR, ePrivacy and cookie legislation
  • Cookie management completely automated
  • Cookie banner based on your corporate identity
  • Automatic composed cookie declaration, always up to date

The Cookiebot solution runs on 1.4 million websites, manages 5.2 billion monthly User Consents and supports 47+ languages.