Skip Navigation
March 21, 2024

The GDPR Cookie Consent plugin adds a subtle banner about cookie law compliance to your website, either in the header or footer. With WPML, you can easily translate this consent banner.

Message in original language

Message translated to German

On This Page:

Getting Started

Start by installing and activating the following:

If you’re new to WPML, check out our Getting Started Guide. It quickly walks you through all the translation options you can use.

Making Your Content Translatable Using WPML

To translate the consent message, you first need to make it translatable:

  1. Go to WPML → Theme and plugins localization and scroll down to Strings in the plugins.
  2. Inside the list, tick the GDPR Cookie Consent checkbox.
  3. Finally, click the Scan selected plugins for strings button.
Selecting the right plugin to scan
Selecting the right plugin to scan

Translating the GDPR Cookie Consent Message Bar and Buttons

Consent banners, like the one in the example below, contain a number of elements: the consent message, accept and reject buttons, settings link, and more.

GDPR Cookie Consent message

To translate the GDPR Cookie Consent elements with WPML:

  1. Go to the WPML → String Translation page.
  2. Using the Search for filter, enter the text you want to translate. For example, to translate the Accept All text, you can search for “Accept”.
Filtering for strings containing the text Accept
Filtering for strings containing the text Accept
  1. When you find the relevant string, click on the plus icon under the corresponding language you want to translate into.
Selecting Accept all text in String Translation
Clicking the Accept all plus icon in String Translation
  1. A dialogue box will open where you can add translations. Once done, click on the tabbed arrow to add translations for the next language. Or, click outside the dialogue box to exit.
Adding translations in the dialog box
Adding translations for Accept All in the dialog box
  1. Repeat these steps to translate the rest of the Cookie Consent message.
Text strings for cookie consent message
Remaining text strings to translate in consent message

Translating Read More Text and URL

To translate the Read More link, and direct users to the correct page version in each language:

  1. Go to GDPR Cookie Consent → Settings.
  2. Click the Customise Buttons tab, and then the Read more sub-tab.
  3. Set the URL in the default language. In our example, our Read More button links to “”.
Setting the URL for the Read More button
  1. Next, go back to the WPML → String Translation page and search for this button’s string.
  2. Click the plus icon and translate the text like any other string.
Translating Read more text in String Translation
Translating the Read More text in String Translation
  1. Repeat these steps for translating the link’s URL. Remember to add the necessary language extension, e.g. – de (German).
Translating the Read more link URL in String Translation

Known Issues

There are no unresolved compatibility issues between this plugin and WPML. Search all known issues.

Getting Help From Our Support

In case you need help translating your site built using GDPR Cookie Consent and WPML, visit WPML’s support forum.