WebToffee Logo
  • Home
  • Plugins
  • Bundles
  • Blog
  • Documentation
  • Support
Login
0

  • Overview
    • Plugin set up
  • GDPR
    • Getting Started
      • Get GDPR Compliant
    • Add and Categorise Cookies
      • Troubleshoot cookie scanner
      • Add cookie manually
      • Disable cookie categories by default
      • Using cookie scanner
    • Auto-block cookies with Script Blocker
      • Compatibility with WP cache plugins
      • Configuration
      • Add custom script blocker
      • Block scripts at client side
      • Block services in Google Tag Manager separately
      • Check script blocking
    • Create Privacy Policy Page
      • Policy generator
    • Customize Settings Pop up
      • Adding cookie settings link to footer
      • Alter colour of toggle button
      • Change cookie category order in settings popup
      • Adding Custom columns into the Audit Table
      • Display category wise cookie list
    • Customize Cookie Notice
      • Category checkboxes on cookie banner
      • Geo-target cookie message bar
      • Customize banner using CSS
      • Accept consent on scroll/delay
      • Customize templates
      • Hide the cookie bar on selected pages
      • Pre-defined templates
      • Shortcodes for banner
    • Multilingual Support
      • Translate using Polylang
      • Multilingual compatibility for Necessary Category
      • Translate using WPML
      • Translate using qTranslate
      • Multilanguage compatibility for privacy policy page
    • Advanced Topics
      • Modify duration of consent
      • Access/Block site based on consent
      • Show/hide 'Privacy and Cookie Policy' tab
  • CCPA
    • Getting Started
      • Get CCPA Compliant
  • Third-Party Compatibility
    • Plugins/Themes
  • FAQ
    • Frequently asked questions
  • Changelog
    • Version 2.4.0

Documentation/GDPR Cookie Consent/Translating GDPR Cookie Consent Plugin with WPML

Translating GDPR Cookie Consent Plugin with WPML

Last updated on September 14, 2021

GDPR Cookie Consent plugin is compatible with some of the most common multilingual plugins like WPML, Polylang, qTranslateX etc. In this article, we will share deep insight into how the GDPR Cookie Consent plugin can be translated into your desired language via WPML.

First of all, install and activate the WPML plugins. Next, configure it for the desired languages. Then, navigate to WPML > String Translations as shown below for customizations w.r.t the plugin:

WPML-String Translation

From the String Translation page that opens up, you will get an option to choose the Select strings with domain drop down. The Select strings with domain drop down consists of two options pertaining to the GDPR Cookie Consent plugin:

  • admin_text_CookieLawInfo-0.9: You can assign translations for all editable text content by selecting this domain.
  • admin_texts_cookielawinfo_privacy_overview_content_settings: To translate the privacy overview text content, you can select this domain.
  • cookie_law_info: You can assign translations for non-editable content like the label, validation messages, pop-up content, etc. by selecting this domain.
Select strings within domain drop down

Case 1: For editable texts

On selecting admin_text_CookieLawInfo-0.9 from the Select strings within domain drop-down, the screen will be as shown below:

List of strings for translating

To translate the string Privacy and Cookie Policy follow the below steps.

  1. Click on the translations link, enter the translation text in respective languages as shown below:
Click on translations

Note: As per the above screenshot, Danish (da), French (fr), and German (de) are the configured languages in WPML.

For example, 

  • Privacy and Cookies Policy-da for danish translation.
  • Privacy and Cookies Policy-fr for french translation. 
  • Privacy and Cookies Policy-de for the german translation.

That is, instead of Privacy and Cookies Policy text, its translated text will be displayed in the GDPR cookie consent plugin.

Once done, tick the Translation is complete checkbox. And then, click on the Save button.

Now switch the language option on your website to see the changes. On switching the language to Danish, you can see that the Privacy and Cookie Policy widget will be as shown below:

Privacy and Cookie Policy in Danish

However, to translate the content of the privacy overview, you will have to select  admin_texts_cookielawinfo_privacy_overview_ content_settings domain from the Select strings within domain drop-down, the screen will be as shown below:

Note: If the above item is not listed in the select strings within the domain drop-down, go to GDPR Cookie Consent > Privacy Overview and click Save Settings. Then, revisit the String translation page.

Case 2: For labels, validation messages, pop-up content

On selecting cookie_law_info domain from the Select strings within domain drop-down, the screen will be as shown below:

String translation

Let us see translation steps for Cookie message – Text editor.

  • Click on the translations link, enter the translation text in respective languages as shown below:
Cookie message-text editor translated

Note: As per the above screenshot, Danish (da), French (fr), and German (de) are the configured languages in WPML.

For example, 

  • Cookie message – Text editor (Danish)  for danish translation.
  • Cookie message – Text editor (French) is for french translation
  • Cookie message – Text editor (German) is for the german translation.

This is, instead of Cookie message – Text editor text, its translated text will be displayed in the GDPR cookie consent plugin.

Once done, tick the Translation is complete checkbox. Click on Save button.

On switching the language to Danish, you can see that the Cookie message-text editor will be as shown below:

Cookie message-text editor translated

Note:

  1. Switch the profile language to the desired language for better results.
  2. If you can’t find the string for translation in the select string domain menu, then probably you will have to scan the strings. To scan for the strings, go to WPML > Themes and plugin localization. From the screen, navigate to the section Strings in the plugins. Select the GDPR Cookie consent plugin from the list and click on Scan selected plugins for strings button as shown below.
WPML-Theme and Plugins localization

At the end of scan, all the strings in the plugin will be auto-populated into the String Translation domain, further to which you can make the necessary translations as mentioned at the beginning of this article.

Now that you have set up everything else in the plugin, you will find that in the script blocker settings, you can only select one category and switching to the other one is overwriting the changes you made in first language. To over come this, you need to make the slug of the each category and their translated categories, the same.

Go to the cookie category page, you may switch the language from the language selection above the category list as shown below.

You can use the Quick Edit button in the cookie category listing page to edit the slug and enter the same slug as in the other language. You won’t be able to do it from the All Languages section due to WordPress limitations.

For instance, if necessary is the slug, click on quick edit section and specify the same slug as in the other language.

Once you have specified the slug same, you will need to choose the category in one language only under script blocker. Also, setting the slug as “necessary” in both languages will make both categories strictly enabled.

Translating cookies

To translate the contents in Cookie Settings pop-up, we need to translate each cookie individually.

  • Go to GDPR Cookie Consent > Cookie List
  • Click on Edit.edit-cookie
  • Add translate under Translate this document. translate-this-document-tab-in-gdpr
  • The Advanced Translation Editor window will appear.
  • Add translations for each title, body contents and save to complete.
  • The percentage of translation done can also be viewed at the bottom.advanced-translator-in-cookie-list
  • Click on Complete to finish.

Translating cookie categories

  • Go to GDPR Cookie Consent > Cookie Category
  • Click on Edit.edit-cookie-category
  • Add translate under Language.languages-section-in-cookie-category
  • Click on Update.

Alternate method

Now, let us go through an additional method for translating cookie categories:

  • Navigate through WPML> Taxonomy Translation> Cookie Category Translation.
  • Click on Add icon to add the translations.Translation of Cookie Category
  • Click on Save to finish.

Switch the language option on your website to see cookies and category content in German.

Cookies and Cookie category listed in German


In a similar manner, you can translate the plugin contents to other desired languages.

Refer to know how the cookie plugin is translated using Polylang.

  • Was this article helpful?
  • Yes, thanks!Not really
Get the plugin

On this page

  • Case 1: For editable texts
  • Case 2: For labels, validation messages, pop-up content
  • Translating cookies
  • Translating cookie categories
  • Alternate method

This article posted in Documentation, GDPR Cookie Consent, Knowledge Base, Multilingual Support

Written by

Shesna

Shesna is a technical content writer for WebToffee. She is familiar in working closely with the SMEs to break down complex technical information into a concise, easy to understand manner.

Comments (36)

  1. Pietro

    March 23, 2022

    Hello,
    I installed the plugin on the gelson.it site
    In the Italian version, the plugin works and on the popup it shows me and select the cookies I want to activate / deactivate but if I switch to the English language the popup opens correctly but I do not see the list of cookies inside it.
    Suggestions? A thousand thanks

    Reply
    • Mark

      Mark

      March 24, 2022

      Hi Pietro,

      Please follow the instructions in the article and translate the categories and cookies to the English language too.

      Reply
  2. Eduard Kasdorf

    January 10, 2022

    Hey there,
    the standard language for GDPR Cookie Consent ist englisch.
    How can I change that to german?
    I Use WPML and have two languages: german and “easy german” (for weak readers).
    My website is: http://www.lebenshilfe-stuttgart.de

    Reply
    • Mark

      Mark

      January 10, 2022

      Hi Eduard,

      We are here to assist.

      The language for all the static elements in UI can be translated automatically to German just by choosing your default language as German on your site. Other dynamic or user input strings like cookie consent bar message, cookie description, etc won’t be translated automatically. You need to manually edit them using WPML following the above guide.

      Reply
  3. Kali

    November 30, 2021

    Hello,

    I have an issue with cookie bar not hiding on translations of Cookie Policy page.

    I’m using WPML plugin on my website, the default language is english. In GDPR Cookie Consent settings under “Customise buttons” -> “Read more” I have selected a page which contains the content of my Cookie Policy, then I opted for hiding the cookie bar in this page so that it can still be accessed and read before any settings are confirmed. Through WPML, I also added polish and german translations for the same page.

    Everything works as intended if I access the default page for my Cookie Policy, which is in english. However, when I view polish or german translation of the Policy (before I accept or reject any cookies), the bar is still present. This in effect blocks me from reading it, since I have also selected the popup with overlay option for my cookie bar.

    Due to how my website and its theme works, I cannot resort to simple string translation outlined in the article above.

    Would you mind suggesting another solution to this issue?

    – Kali

    Reply
    • Mark

      Mark

      December 6, 2021

      Hi Kali,

      We are here to assist.

      You can use this filter to hide the banner on any using the page slug. Please read the article and after replacing the page slugs with your privacy policy page slug in the code, copy the code to your active child theme’s functions.php.

      Reply
  4. Klemart3D

    July 2, 2021

    Hi, how can I translate a meta like “header script” to display a different script/tag for each language? I do it for two languages FR + EN, the script FR is well displayed but not the EN script 🙁

    Reply
    • Mark

      Mark

      July 5, 2021

      Hi,

      Kindly submit a ticket here with the different scripts and mention the version number of the plugin you are using.

      Reply
  5. Germán

    May 4, 2021

    Hello

    I am using this shortcode

    [cookie_audit_category columns="cookie,description,duration,type,category" style="winter"]

    in the Spanish page the table is shown, but in the English page it does not, it only shows the header of the table.

    What can i do?

    Reply
    • Mark

      Mark

      May 6, 2021

      Hi,

      Kindly ensure that you have translated categories and cookies to English language as well. You must assign the translated cookies to translated categories.

      Reply
  6. Alberto

    April 27, 2021

    I have installed wpml (ita,eng,fra) if I accept cookie in one language and I switch in other language showme another time the banner.
    Why?

    Reply
    • Mark

      Mark

      May 2, 2021

      Hi Alberto,

      We can help with that. Please submit and ticket here with your site URLs.

      Reply
  7. PJ

    Peter jamieson

    April 16, 2021

    I need to translate the Privacy and Cookie Policy. However, under “admin_text_CookieLawInfo-0.9”, I do NOT have any section about the privacy policy where your screenshot shows I should add -de or the language suffix.
    Why is this not visible to me ?

    Reply
    • Mark

      Mark

      April 22, 2021

      Hi Peter,

      We added -de as a sample to understand that you can add your German or other translations there. Please add your actual translation instead.

      Reply
  8. Moisés Álvarez

    April 9, 2021

    I am having trouble with the translation of the Privacy Overview with WPML. I can’t find admin_texts_cookielawinfo_privacy_overview_content_settings and cookie_law_info in Select strings with domain drop down.

    Reply
    • Mark

      Mark

      April 13, 2021

      Hi Moisés,

      We can help with that. Go to GDPR Cookie Consent > Privacy Overview menu and Save the settings once and then, revisit the String translation page.

      Reply
  9. Greg

    March 27, 2021

    Hi,

    Can’t seem to find where to translate, bI’m using WPML, the cookie duration (months, day, years).
    Also, where to set if toggle are ON or OFF in the cookie settings (e.g. Neccesary cookies).
    Thank you.

    Reply
    • Mark

      Mark

      April 1, 2021

      Hi Greg,

      Those strings are translated within the plugins translation files. If you are working with a language not supported currently, please submit a ticket here with your requirement.

      To set the button state, please go to Cookie Category > click Edit on the category that you want to change and find default button state there.

      Reply
  10. Edmunds

    February 9, 2021

    Hello. I scanned plugin and theme again, but in string translation doesnt have this domain, so i can’t translate privacy overview text – admin_texts_cookielawinfo_privacy_overview_ content_settings.. What should i do?

    Reply
    • Mark

      Mark

      February 15, 2021

      Hi Edmunds,

      We are here to assist.
      The domain should be present in the list. In order to debug the issue, please submit a ticket here with site details.

      Reply
  11. Agnes LESAGE

    Agnes

    December 4, 2020

    I am having trouble with the Privacy Overview text.
    I am editing it in French in the BO (as everything else in my site) and would expect to translate it with WPML string translator. But it does not appear.
    I fount out I have to edit it in English in the BO, and then translate it opposite in French in Strings.
    But when I come later, it is in French in the BO again, my edits do not reflect, and I have to redo it all: edit in English, translate in French.
    I wonder if something is not wrong in that setup.
    Rest works fine.

    Reply
  12. Agnes LESAGE

    Agnes

    December 4, 2020

    I am having trouble with the Privacy Overview text.
    I am editing it in French in the BO (as everything else in my site) and would expect to translate it with WPML string translator. But it does not appear.
    I fount out I have to edit it in English in the BO, and then translate it opposite in French in Strings.
    But when I come later, it is in French in the BO again, my edits do not reflect, and I have to redo it all: edit in English, translate in French.
    I wonder if somethign is not woring in that setup.
    Rest works fine.

    Reply
  13. Roy Keultjes

    Roy Keultjes

    November 19, 2020

    Hello, I can’t figure out how to translate the text in the pop-up that’s displayed above the Cookie Categories..?

    Reply
    • Mark

      Mark

      November 20, 2020

      Hi Roy,

      To translate the content of the privacy overview, you will have to select admin_texts_cookielawinfo_privacy_overview_ content_settings domain from the Select strings within domain drop-down.

      Reply
      • Morten Pauch

        Morten Pauch

        February 13, 2021

        Where can I translate this “Privacy Overview” when using loco translate?

        Reply
        • Morten Pauch

          Morten Pauch

          February 13, 2021

          Nevermind – just found it 🙂

          Reply
  14. Ana Alonso

    Ana Alonso

    October 28, 2020

    Hi,
    I can’t find the way to translate the ‘disabled’ that is on the cookie configuration settings. In spanish it says Discapacitado which means disabled in a physical way but not in a metaphorical, which is quite horrible 🙁
    where can I change it? I have looked at the WMPL strings, configuration, everywhere but I havent managed to find it.
    Thanks in advance
    Ana

    Reply
    • Mark

      Mark

      November 3, 2020

      The error in this translation is already fixed in the dev version. It will be updated in the next release.

      Reply
  15. Fabrice Piccinali

    Fabrice Piccinali

    October 1, 2020

    Hello,
    I followed your instructions regarding to the categories translations. However, WordPress don’t let me copy/paste the same category slug for each language. For example, “necessary” becomes “necessary-en” in English language.
    The primary language is French on this website.
    Is it a known issue? What am I doing wrong?
    Thanks for your help.
    Best regards.

    Reply
    • Mark

      Mark

      October 7, 2020

      Please follow the instruction carefully. switch language from the top bar and use the quick edit link to do it.

      Reply
  16. Nicolas Mollet

    July 24, 2020

    Hello
    I use the multilingual alternative plugin “Polylang”, is it compatible with GDPR Cookie Consent for string translations ?
    Thank you

    Reply
    • Mark

      Mark

      July 30, 2020

      Please refer this article.

      Reply
  17. Justyna Ritter

    May 26, 2020

    It doesn´t work. I use GDPR with WPML. If I change the language from german to english – I get on the link privacy policy a 404 Error Site. The Link of my english Privacy Policy is not the same, like the standard Link from GDPR (Standard: /Privacy%20Policy — my translated Link: /privacy-policy/?lang=en
    What can I do???

    Reply
    • Mark

      Mark

      May 29, 2020

      You can use the code snippet here to set the privacy overview page according to language.

      Reply
  18. Albertazzi Marta

    Albertazzi Marta

    May 13, 2020

    Hello.
    I need to provide the translation for the categories tags.
    Where am I supposed to insert the translation for each cookie category? I searched into the WPML string locator/translator but could not detect them. Should I translate them directly in the plugin settings?
    Thank you.

    Reply
    • Mark

      Mark

      May 14, 2020

      You can add the translation from the Cookie Category page itself. Use the (+) icon again the language flags.

      Reply

Got any query? Please leave a comment or reach out to our support

Cancel reply

Your email address will not be published. Required fields are marked *

We develop awesome WordPress plugins & WooCommerce extensions to help build successful online businesses.

© 2023 WebToffee. All rights reserved.

Our plugins

  • GDPR Cookie Consent
  • PDF Invoices & Packings Slips
  • Product Import Export Plugin
  • User & Customer Import Export
  • Import Export Suite
  • Sequential Order Numbers
  • Smart Coupons for WooCommerce
  • URL Coupons for WooCommerce
  • PayPal Express Checkout
  • Stripe Payment Gateway
  • Subscriptions for Woocommerce
  • Product Catalog Sync for Facebook
  • PrintNode for PDF Invoices
  • Order, coupon, subscriptions for WooCommerce
  • WordPress Backup and Migration
View more +

Get Started

  • Plugins
  • Testimonials
  • Affiliates
  • We're hiring

Help & Support

  • Documentation
  • Documentation (Basic)
  • FAQ
  • Support

Company

  • Terms & Conditions
  • Privacy Policy
  • Refund policy
  • Support policy
  • License Activation

© 2023 WebToffee. All rights reserved.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies. However you may visit Cookie Settings to provide a controlled consent.
Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of the basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website, to store user preferences and provide you with content and advertisements that are relevant. Such cookies will be stored on your browser but only upon procuring consent.

You will also have the option to opt-out of these cookies should you want to. But opting out of some of these cookies may have an effect on your browsing experience as per the descriptions elucidated against the respective categories below.

Necessary
Always Enabled
The cookies defined under this category are absolutely essential for the website to function. Hence they are loaded by default irrespective if user consent.
CookieDescription
__cfruidCloudflare sets this cookie to identify trusted web traffic.
__stripe_midStripe sets this cookie cookie to process payments.
__stripe_sidStripe sets this cookie cookie to process payments.
cookielawinfo-checkbox-advertisementSet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category .
cookielawinfo-checkbox-analyticsSet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Analytics" category .
cookielawinfo-checkbox-necessarySet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Necessary" category .
cookielawinfo-checkbox-preferencesThis cookie is set by the GDPR Cookie Consent plugin to check if the user has given consent to use cookies under the "Preferences" category.
CookieLawInfoConsentRecords the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie.
PHPSESSIDThis cookie is native to PHP applications. The cookie is used to store and identify a users' unique session ID for the purpose of managing user sessions on the website. The cookie is a session cookie and is deleted when all the browser windows are closed.
viewed_cookie_policyThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not a user has consented to the use of cookies. It does not store any personal data.
Analytics
Analytics cookies help us understand how our visitors interact with the website. It helps us understand the number of visitors, where the visitors are coming from, and the pages they navigate. The cookies collect this data and are reported anonymously.
CookieDescription
_gaThis cookie is installed by Google Analytics. The cookie is used to calculate visitor, session, campaign data and keep track of site usage for the site's analytics report. The cookies store information anonymously and assigns a randomly generated number to identify unique visitors.
_ga_BQH8MSKD4MThis cookie is installed by Google Analytics.
_gat_gtagIdentification code of website for tracking visits.
_gidThis cookie is installed by Google Analytics. The cookie is used to store information on how visitors use a website and helps in creating an analytics report of how the website is doing. The data collected including the number visitors, the source where they have come from, and the pages visited in an anonymous form.
_hjAbsoluteSessionInProgressHotjar sets this cookie to detect the first pageview session of a user. This is a True/False flag set by the cookie.
_hjFirstSeenHotjar sets this cookie to identify a new user’s first session. It stores a true/false value, indicating whether it was the first time Hotjar saw this user.
_hjidHotjar cookie. This cookie is set when the customer first lands on a page with the Hotjar script. It is used to persist the random user ID, unique to that site on the browser. This ensures that behavior in subsequent visits to the same site will be attributed to the same user ID.
_hjIncludedInPageviewSampleHotjar sets this cookie to know whether a user is included in the data sampling defined by the site's pageview limit.
_hjIncludedInSampleThis cookie is set to let Hotjar know whether that visitor is included in the sample which is used to generate heatmaps, funnels, recordings, etc.
_hjIncludedInSessionSampleHotjar sets this cookie to know whether a user is included in the data sampling defined by the site's daily session limit.
_hjTLDTestTo determine the most generic cookie path that has to be used instead of the page hostname, Hotjar sets the _hjTLDTest cookie to store different URL substring alternatives until it fails.
CONSENTYouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.
has_recent_activityThis cookie is used to signal to the code repository website if the user has browsed other website resources during the current session.
tk_aiGathers information for our own first-party analytics tool about how our services are used. A collection of internal metrics for user activity and is used to improve user experience.
tk_lrThis cookie is set by the JetPack plugin on sites using WooCommerce. This is a referral cookie used for analyzing referrer behavior for Jetpack.
tk_orThis cookie is set by the JetPack plugin on sites using WooCommerce. This is a referral cookie used for analyzing referrer behavior for Jetpack.
tk_qsGathers information for our own first-party analytics tool about how our services are used. A collection of internal metrics for user activity and is used to improve user experience.
tk_r3dThe cookie is installed by JetPack. Used for the internal metrics for user activities to improve user experience.
Advertisement
Advertisement cookies help us provide our visitors with relevant ads and marketing campaigns.
CookieDescription
_fbpThis cookie is set by Facebook to deliver advertisements when they are on Facebook or on a digital platform powered by Facebook advertising after visiting this website.
frThe cookie is set by Facebook to show relevant advertisements to the users and measure and improve the advertisements. The cookie also tracks the behavior of the user across the web on sites that have Facebook Pixel or Facebook social plugin.
VISITOR_INFO1_LIVEA cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
YSCYSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
yt-remote-connected-devicesYouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt-remote-device-idYouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
Preferences
Preference cookies are used to store user preferences to provide them with content that is customized accordingly. This includes the language of the website or the location of the visitor.
CookieDescription
_gh_sessThis cookie is used to preserve users' states across page requests.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
CookieDurationDescription
_hjSession_137657130 minutesNo description
_hjSessionUser_13765711 yearNo description
_octo1 yearNo description available.
_zendesk_authenticatedpastNo description
_zendesk_sessionsessionNo description available.
_zendesk_shared_sessionsessionNo description available.
edd_wp_session12 hoursNo description available.
logged_in1 yearNo description available.
m2 yearsNo description available.
Save & Accept