Translating GDPR Cookie Consent plugin with WPML

GDPR Cookie Consent plugin is compatible with some of the most common multilingual plugins like WPML, Polylang, qTranslateX etc. In this article, we will share deep insight into how the GDPR Cookie Consent plugin can be translated into your desired language via WPML.

Refer Translating GDPR Cookie consent plugin with Polylang to know how the cookie plugin is translated using Polylang.

Once the WPML plugin is installed and activated, you need to first configure it for the desired languages. Once the languages have been set up, navigate to WPML > String Translations as shown below for customizations w.r.t the plugin:

WPML-String Translation

From the String Translation page that opens up, you will get an option to choose the Select strings with domain drop down. The Select strings with domain drop down consists of two options pertaining to the GDPR Cookie Consent plugin:

  • admin_text_CookieLawInfo-0.9: You can assign translations for all editable text content by selecting this domain.
  • cookie_law_info: You can assign translations for non-editable content like the label, validation messages, pop-up content etc. by selecting this domain.
Select strings within domain drop down

On selecting admin_text_CookieLawInfo-0.9 from the Select strings within domain drop-down, the screen will be as shown below:

List of strings for translating

For instance, let us see how the string Privacy and Cookie Policy is translated.

  1. Click on the translations link, enter the translation text in respective languages as shown below:
    Click on translations

    Note: Here, the translations can be given for three languages; Danish (da), French (fr) and German (de) since these are the only languages configured in WPML. All the languages configured in WPML will be listed here for the translation.

  2. Enter the translated text in the field provided. For example, Privacy and Cookies Policy-da is entered for danish translation. Privacy and Cookies Policy-fr is entered for french translation and Privacy and Cookies Policy-de is entered for german translation. This means that instead of Privacy and Cookies Policy text, the concerned translated text will be displayed in the GDPR cookie consent plugin when switched to respective languages.
  3. Once done, tick the Translation is complete checkbox.
  4. Click on Save button.

Now switch the language option in your website to see the changes. On switching the language to Danish, you can see that the show again tab – Privacy and Cookie Policy will be as shown below:

Privacy and Cookie Policy in Danish

On selecting cookie_law_info domain from theSelect strings within domain drop-down, the screen will be as shown below:

String translation

For instance, let us see how the label Cookie message – Text editor is translated.

  1. Click on the translations link, enter the translation text in respective languages as shown below:
    Cookie message-text editor translated

    Note: Here, the translations can be given for three languages; Danish (da), French (fr) and German (de) since these are the only languages configured in WPML. All the languages configured in WPML will be listed here for the translation.

  2. Enter the translated text in the field provided. For example, Cookie message – Text editor (Danish) is entered for danish translation. Cookie message – Text editor (French) is entered for french translation and Cookie message – Text editor (German) is entered for german translation. This means that instead of Cookie message – Text editor text the concerned translated text will be displayed in the GDPR cookie consent plugin when switched to respective languages.
  3. Once done, tick the Translation is complete checkbox.
  4. Click on Save button.

On switching the language to Danish, you can see that the Cookie message-text editor will be as shown below:

Cookie message-text editor translated

Note:

  1. It would be advisable if the profile language is switched to the desired language for better results.
  2. If the strings that you wish to be translated are not listed in the selected domain, just go to WPML > Themes and plugin localization. From the screen, navigate to the section Strings in the plugins. Select the GDPR Cookie consent plugin from the list and click on Scan selected plugins for strings button as shown below.
    WPML-Theme and Plugins localization

    At the end of scan, all the strings in the plugin will be auto-populated into the String Translation domain, further to which you can make the necessary translations as mentioned at the beginning of this article.

 

Leave a Reply

Your email address will not be published. Required fields are marked *