Home > Docs > Translate Consent Banner Using WPML

Translate Consent Banner Using WPML

Last updated on November 29, 2024

The GDPR Cookie Consent plugin offers a versatile translation feature that enables the cookie banner to be displayed in various languages, enhancing user experience across different regions. The translation options are categorized as follows:

  • Translation for Supported languages (Default)
  • Translation for Non-Supported languages
  • Translation for Custom languages

Translation for Supported languages

These are the set of languages that are fully supported by the plugin. The banner content is automatically translated into these languages, requiring no additional configuration. Translate to the default languages (built into the plugin) following the steps mentioned in the article: Changing the language of the cookie consent banner.

Translation for Non – Supported languages

There may be cases where the store owner needs to translate the banner into languages other than those supported by the plugin. To achieve this, the plugin is compatible with some of the most common multilingual plugins, like WPML. This article will share deep insight into how the GDPR Cookie Consent can be translated into your desired language using WPML.

  1. Install and Activate WPML to translate your site’s content.
  2. Manually insert the translated banner content through the Language List page.

Step 1: Install plugins

First, install and activate the WPML plugins. Then, configure them for the desired languages. This will translate the site’s content into the desired language.

Step 2: Translate Banner Content

To translate the content manually for languages not supported by the plugin, follow the steps below.

  1. From the WordPress Dashboard, Go to Cookie ConsentLanguages
  2. On the Language list page, Go to the language for which the translation needs to be done. Then, click on the Edit Content link.
Language list page
Language list page
  1. On the next page, ensure that the desired language is selected in the Edit content in drop-down.
    Enter the manually translated content in the appropriate fields: Title, Message, and button labels.
Manually edit banner language
Manually edit banner language
  1. Enter the manually translated content in the appropriate fields: Title, Message, and button labels.
  2. In the “Cookie Policy” link field, enter the URL of the translated Cookie Policy page. The banner will then link to the appropriate translated Cookie Policy page.

Translation for Custom languages

The custom languages, added through the WPML plugin, can now be listed under the Language list. To add a translation for custom languages, follow the steps below.

  1. From the WordPress Dashboard, Go to Cookie ConsentLanguages
  2. On the Language list page, click on the Add language button. Then select the custom language added through the WPML plugin. Here, its Custom_language(CL).
Custom_language - Language List
Custom_language – Language List
  1. Then, click on the Edit Content link. Then enter the translated content manually and click on Save translation to update the content in the desired language.