Skip to main content

Cookie Declaration page not the right language

Comments

11 comments

  • Hi Erik,

    After inspecting your domain (the one mentioned in your post) I can see that everything work properly as it should, and Cookiebot has been implemented correctly. 

    However, my guess so far is that the problem comes from the Cookiebot admin panel. Could you please check if you have set the Dutch language correctly in the admin panel. You could do that from the setting about the language under 'Content' tab. 
    You could find more information about the Cookie Declaration settings here: https://support.cookiebot.com/hc/en-us/articles/360004374474-What-is-the-Cookie-Declaration-cookie-policy-and-what-is-included-in-it-

    If the problem does not comes from the admin panel settings and it could not be solved, please do not hesitate to contact us in order to investigate the issue further more.

    Regards, 
    Spas

    0
  • Erik

    Dear,

    In the content tab, we have Dutch and English. Dutch is the default language. We de-selected auto-detect language, as we push the language in GTM (https://support.cookiebot.com/hc/en-us/articles/360005164493-Multilingual-support-when-using-GTM). The cookie consent bar is in the right language (for both Dutch and English), but the cookie policy page isn't.

     

    So the problem is not fixed. Could you please investigate further?

     

    Thanks and best,
    Erik

    0
  • Claus Harup

    I have the exact same issue....

    https://3rcenter.dk/ - Danish
    https://en.3rcenter.dk/ - English

    0
  • Claus Harup

    It is totally random.... sometimes it works in chrome desktop....

     

    It would be smart if the javascript would respect:

    1: html lang="xxxx"

    2: preferred browser language

    3 default settings in CookieBot setup

    0
  • Hi,

    You would need to apply the same logic to the declaration tag as to the banner tag in regards of locking the language to the current language on the website, for example:

    <script>
    var contentPlaceholder = document.getElementById("bodycontent");
    var cookieDeclarationScript = document.createElement("script");
    cookieDeclarationScript.type = "text/javascript";
    cookieDeclarationScript.id = "CookieDeclaration";
    cookieDeclarationScript.src = "https://consent.cookiebot.com/00000000-0000-0000-0000-000000000000/cd.js";

    var currentUserPagePathname = location.pathname.toLowerCase();
    var currentUserPageCulture = "en"; //default to English

    if (currentUserPagePathname.indexOf("/fr")==0)
    {
    currentUserPageCulture = "fr";
    }
    else if (currentUserPagePathname.indexOf("/es")==0)
    {
    currentUserPageCulture = "es";
    }
    cookieDeclarationScript.setAttribute("data-culture", currentUserPageCulture);

    contentPlaceholder.appendChild(cookieDeclarationScript);
    </script>

    In this way you will set the default language and make sure that the CookieDeclaration and the website would be in the same language as desired.

    Regards,
    Spas

    0
  • Claus Harup

    .... so the checkbox saying: Autodetect user's language does not work?

    0
  • Claus Harup

    Setting the configuration below in GTM does not help:

     

    <script id="Cookiebot" data-culture="en" src="https://consent.cookiebot.com/uc.js?cbid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" type="text/javascript"></script>
    <script>


    function CookiebotCallback_OnAccept() {
    if (Cookiebot.consent.preferences)
    dataLayer.push({'event':'cookieconsent_preferences'});
    if (Cookiebot.consent.statistics)
    dataLayer.push({'event':'cookieconsent_statistics'});
    if (Cookiebot.consent.marketing)
    dataLayer.push({'event':'cookieconsent_marketing'});
    }
    </script>

    0
  • Erik

    Thanks, this function works Spas!

    0
  • Dirk Spannaus

    Spas – vConnect – Community Supporter I added the language JS as a variable and wanted to use this in your suggested script adoption - see bold line:

    <script>
    var contentPlaceholder = document.getElementById("cookiebot");
    var cookieDeclarationScript = document.createElement("script");
    cookieDeclarationScript.type = "text/javascript";
    cookieDeclarationScript.id = "CookieDeclaration";
    cookieDeclarationScript.src = "https://consent.cookiebot.com/XXXXXXXXXXXXXXXXXXXXXX/cd.js";
    cookieDeclarationScript.setAttribute("data-culture", {{currentUserPageCulture}});
    contentPlaceholder.appendChild(cookieDeclarationScript);
    </script>

     

    Seems not to work? What did I miss?

    0
  • Björn

    is there also a guidance for wordpress for people who don't know JS?

    0
  • james234298

    Subsequent to reviewing your space (the one referenced in your post) I can see that everything work appropriately as it ought to, and Cookiebot has been executed effectively.

    Notwithstanding, my speculation up to this point is that the issue comes from the Cookiebot administrator board. Could you if it's not too much trouble, check in case you have set the Dutch language accurately in the administrator board. You could do that from the setting about the language under 'Content' tab.

    0

Please sign in to leave a comment.