- October 11, 2021
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
- Getting Started
- Making Your Content Translatable Using WPML
- Translating Your Cookies Message Bar & Buttons
- Known Issues
- Getting Help From Our Support
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.
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.
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:
- Go to the WPML → String Translation page.
- Use the filter on the top of the page to find the text you want to translate.
- 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.
- Follow the same steps to translate the main Cookie Consent 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.
- 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”.
- Now, go back to the WPML → String Translation page and search for this button’s string.
- Click the plus symbol and translate the text just like any other string.
- Repeat these steps for translating the link’s URL, remembering to add the necessary language extension, eg, “de” for German.
In case you need help translating your site built using CookieYes and WPML, visit WPML’s support forum.