Translating cookie consent notices, banners, and categories becomes even more critical when managing a multilingual WordPress site. By combining WPML’s powerful translation capabilities with GDPR Cookie Consent’s compliance tools, businesses can provide a consistent and legally compliant experience for users in different regions. This article explores why multilingual cookie consent is essential, how WPML and GDPR Cookie Consent work together, and the step-by-step process to implement to translate cookie banners, consent messages, and cookie categories into multiple languages, ensuring compliance and improving user trust across global audiences.
Prerequisites
Make sure you have:
- Installed and activated the GDPR Cookie Consent Plugin.
- Installed and configured the WPML core plugin.
- Activated the WPML String Translation add-on.
The Article flows as follows:
- Translating the plugin content.
- Static content
- Dynamic content
- Translating cookies
- Translating cookie categories
Translating Plugin Content
Step 1: Scan the Plugin for Strings
Before starting the translation process, scan the plugin to identify translatable strings.
- Navigate to WPML > Theme and Plugins Localization in your WordPress dashboard.
- Scroll to the Scan strings in themes, plugins, and WordPress section.
- Under the Plugins section, locate and select GDPR Cookie Consent plugin.
- Click Scan selected components for strings to start scanning.
- Wait for WPML to complete the scanning process. A pop-up will display the total number of detected strings.
- Once the scan is complete, WPML will add the identified strings to the translations table.
Step 2: Selecting and translating the static strings.
Hardcoded text in your plugin is called static content. It is hardcoded in PHP files and includes UI elements like buttons, labels, messages, and form field placeholders. These texts do not change based on user input.
- Navigate to WPML > Translation Management.
- Scroll down until you find the Other Texts (Strings) section, which allows you to translate text from themes, plugins, and additional elements.
- Click on the All domains filter and select the relevant domain. The static content of the WebToffee’s Cookie Consent Plugin is listed in the textdomain: webtoffee-gdpr-cookie-consent.
- Use the search bar to find specific text you want to translate.
- Check the boxes next to the strings that require translation.
- After selecting the required strings, scroll to the Translate your content section.
- WPML will take you to the Translation Controls interface, where you can configure how the plugin should translate the selected strings.
- Click on the dropdown menu next to All languages to select the translation method:
- Translate automatically – WPML AI instantly translates the content.
- Translate manually – Users manually input translations.
- Do nothing – This is used for custom languages, which the AI won’t be able to translate. The translation has to be input manually.
- WPML offers review options before publishing translations. Select the preferred review type.
- If WPML detects previously translated content, choose whether to keep existing translations or overwrite them.
- Once everything is configured, click the Translate button to finalize the translation process.
Step 3: Selecting and translating the dynamic strings.
Dynamic content is stored in the WordPress database and changes based on user input, plugin settings, or site configuration.
- Navigate to WPML > Translation Management.
- Scroll down until you find the Other Texts (Strings) section, which allows you to translate text from themes, plugins, and additional elements.
- Click on the All domains filter and select the relevant domain. The dynamic content of the WebToffee’s Cookie Consent Plugin is listed when admin_text_cookielawinfo-0.9 is selected.
- Use the search bar to find the specific text you want to translate.
- Check the boxes next to the strings that require translation.
- After selecting the required strings, scroll to the Translate your content section.
- WPML will take you to the Translation Controls interface, where you can configure how the plugin should translate the selected strings.
- Click on the dropdown menu next to All languages to select the translation method:
- Translate automatically – WPML AI instantly translates the content.
- Translate manually – Users manually input translations.
- WPML offers review options before publishing translations. Select the preferred review type.
- If WPML detects previously translated content, choose whether to keep existing translations or overwrite them.
- Once everything is configured, click the Translate button to finalize the translation process.
Translating Cookies
The Cookies can be translated from the Cookie list page. To translate the Cookies into the preferred language, follow the steps mentioned below:
- Go to GDPR Cookie Consent > Cookie List
- Click on Edit.
- Add translate under Translate this document.
- 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.
- Click on Complete to finish.
Translating cookie category
The cookie category can be translated using two different methods:
- From the Cookies Category page in the GDPR Cookie Consent plugin.
- From the Taxonomy Translation page in the WPML plugin.
Method 1: From the Cookies Category page in the GDPR Cookie Consent plugin.
- Go to GDPR Cookie Consent > Cookie Category
- Click on Edit.
- Add translate under Language. This will open up a new Add Cookie Category page. As translations are added as new categories, enter the translated text and click on the Add cookie category. You can see additional information, such as Language, and This is a translation of. This extra information lets us know the original cookie category to which the translated one belongs.
Method 2: From the Taxonomy Translation page in the WPML plugin.
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.
- Click on Save to finish.
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
Mark
March 24, 2022
Hi Pietro,
Please follow the instructions in the article and translate the categories and cookies to the English language too.
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:
www.lebenshilfe-stuttgart.de
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.
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
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.
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 🙁
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.
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?
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.
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?
Mark
May 2, 2021
Hi Alberto,
We can help with that. Please submit and ticket here with your site URLs.
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 ?
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.
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.
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.
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.
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.
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?
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.
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.
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.
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..?
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.
Morten Pauch
February 13, 2021
Where can I translate this “Privacy Overview” when using loco translate?
Morten Pauch
February 13, 2021
Nevermind – just found it 🙂
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
Mark
November 3, 2020
The error in this translation is already fixed in the dev version. It will be updated in the next release.
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.
Mark
October 7, 2020
Please follow the instruction carefully. switch language from the top bar and use the quick edit link to do it.
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
Mark
July 30, 2020
Please refer this article.
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???
Mark
May 29, 2020
You can use the code snippet here to set the privacy overview page according to language.
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.
Mark
May 14, 2020
You can add the translation from the Cookie Category page itself. Use the (+) icon again the language flags.