The Cookie Law Info 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 content||Message translated to Spanish|
- Getting started and what to check
- WPML translation tools
- Making your content translatable using WPML
- Translating your Cookies Message Bar & Buttons
- Getting help from our support
Ask them to install and configure core WPML plugins (WPML Multilingual CMS, WPML String Translation, and WPML Translation Management).
If so, you need to follow the steps below.
Set up WPML from the WPML → Languages page. See our WPML Getting Started Guide for a complete reference. The initial three-step setup is simple and self-explanatory, asking you to choose a default language, set of active languages, and language selector. (For starters, choose the footer language selector. You can change this later.)
Next, install and activate the core WPML plugins (WPML Multilingual CMS, WPML String Translation, and WPML Translation Management) followed by other WPML plugins that may depend on them.
Install the Cookie Law Info plugin and define the options.
WPML offers two translation editors you can use for translating your site’s content:
- WPML classic translation editor (CTE).
- WPML advanced translation editor (ATE) offers automatic translation, a glossary, spell checker, and more! The automatic machine translation service starts at $4.98/month for 5,000 words and provides enough word quota for most sites.
Besides translating your site content yourself, you can also:
- Send your content for translation to a professional translation service.
- Create your own team of local translators from the Translation Roles tab in Translation Management and assign translation jobs to them.
Go to the WPML →Theme and plugins localization page and check the first option: Translate themes and plugins using WPML’s String Translation only (don’t load .mo files).
Click on Save.
Next, scroll down to the Strings in the plugins section and select Cookie Law Info from the list. Finally, click on the Scan selected plugins for strings button.
Once your original message is written on the Cookie Law Info → Cookie Law Setting page, you will need to translate it. We will translate the Cookie Message and the Accept button of your cookie message as shown below:
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.
3. When you find the relevant string, click on the translations link next to it and add your translated text.
4. Finally, choose the Translation is complete option and click Save.
5. Follow the same steps to translate the message itself:
If you choose to display a Read More button, the user needs to be redirected to a landing page using the correct language.
1. From the Cookie Law Settings page, set up the URL in the default language.
In our example, we use a button called Read More that we link to “https://mylink.co.uk”.
2. Now, go back to the WPML → String Translation page and search for this URL.
3. Change the URL to the Spanish version, select the checkbox for Translation is complete, and click Save.
In case you need help translating your site built using Cookie Law Info and WPML, visit WPML’s support forum.