Skip Navigation
Updated
September 20, 2023

The CookieYes plugin adds a subtle banner about cookie law compliance to your website, either in the header or footer. Use WPML to easily translate the content of this message.

Message in original language

Message translated to German

On This Page:

Getting Started

Start by installing and activating the following:

  • The CookieYes plugin
  • WPML core plugin and WPML String Translation add-on

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

Go to the WPML → Theme and plugins localization page, scroll down to the Strings in the plugins section and select GDPR Cookie Consent from the list. Finally, click on the Scan selected plugins for strings button.

Selecting the right plugin to scan

Translating Your CookieYes Message Bar and Buttons

Once you’ve set your consent message on the GDPR Cookie Consent → Settings page, you will need to translate it. We will translate the main Cookie Message and the Accept All button as shown below:

Your cookie message with the Accept All button
  1. Go to the WPML → String Translation page.
  2. Use the filter on the top of the page to find the text you want to translate.
Selecting the right string to scan
  1. When you find the relevant string, click on the plus symbol under the corresponding language you want to translate first. A dialogue box will open where you can add the translation. Once you’ve completed the translation, simply click on the tabbed arrow for the next language to save and move on. If there are no more translations to add, click outside of the dialogue box or press return on your keyboard to save the content and exit the box.
Translating the button text
  1. Follow the same steps to translate the main Cookie Consent message:
Translating the message

If you choose to display a Read More button, the user needs to be redirected to a landing page via a link in the correct language.

  1. Go to the GDPR Cookie Consent → Settings page, click the Customise Buttons tab, and then the Read more sub-tab. Set the URL in the default language. In our example, our Read More button links to “https://mylink.co.uk”.
Setting the URL for the button
  1. Now, go back to the WPML → String Translation page and search for this button’s string.
Searching for the hyperlink text to translate
  1. Click the plus symbol and translate the text just like any other string.
  2. Repeat these steps for translating the link’s URL, remembering to add the necessary language extension, eg, “de” for German.
Translating the link URL

Using CookieYes, you can easily block cookies until a user gives consent. 

For example, let’s say you are using WPML’s Browser language redirect feature. To redirect users to their preferred language, this feature enables the _icl_visitor_lang_js cookie for all site visitors. 

You can ensure this cookie is set only after a user clicks the Accept button:

  1. From your site’s dashboard, go to CookieYes and click on the Go to Web App button.
  2. From your CookieYes dashboard, enter the Cookie Manager tab and scan your site for cookies. 
  3. Once scanning is complete, click on the Functional tab and edit the _icl_visitor_lang_js cookie.
Editing the Functional cookie
  1. Expand the Show advanced options section. In Script URL Pattern, enter sitepress-multilingual-cms and Submit your changes.
Changing the URL pattern to block the cookie

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 CookieYes and WPML, visit WPML’s support forum.