Skip to main content

Translations In CookieYes WordPress Plugin

Last updated on May 2, 2024

The CookieYes WordPress plugin offers extensive language support, allowing you to display the cookie consent banner in over 175 languages, ensuring comprehensive coverage for global audiences. Its default auto-translation feature facilitates seamless translation for 41 languages , effortlessly providing website owners with a localized cookie consent experience.

  • English (Default)
  • Arabic (ar)
  • Basque (eu)
  • Bosnian (bs)
  • Bulgarian (bg)
  • Catalan (ca)
  • Chinese (zh)
  • Croatian (hr)
  • Czech (cs)
  • Danish (da)
  • Dutch (nl)
  • Estonian (et)
  • Finnish (fi)
  • French (fr)
  • Galician (gl)
  • German (de)
  • Greek (el)
  • Hungarian (hu)
  • Italian (it)
  • Japanese (ja)
  • Korean (ko)
  • Latvian (lv)
  • Lithuanian (lt)
  • Maltese (mt)
  • Norwegian (nb)
  • Polish (pl)
  • Portuguese (pt-BR)
  • Portuguese (pt-PT)
  • Romanian (ro)
  • Russian (ru)
  • Serbian (sr-Cyrl)
  • Serbian (sr-Latn)
  • Slovak (sk)
  • Slovene (sl)
  • Spanish (es)
  • Swedish (sv)
  • Tagalog (tl)
  • Thai (th)
  • Turkish (tr)
  • Ukrainian (uk)
  • Welsh (cy)

Translation for Users Connected to CookieYes Web App

For users who have connected the CookieYes plugin to the CookieYes Web App, you can access the feature Auto-Translation Based on HTML Language.

First, add the desired languages you want to support for translation in the CookieYes Web App. To add a new language for translation in the CookieYes Web App, follow these steps:

After adding the desired languages to the CookieYes Web App, you can leverage the translation features.

Auto-Translation Based on HTML Language

The CookieYes automatically detects the language based on the lang attribute in your website’s <html> tag. If your site does not have an lang attribute defined, you can manually assign the language by following these steps:

 This advanced configuration is only available for users on the Basic, Pro and Ultimate plans.

1. Add the following code snippet within the <script> tags:

<script>
        window.ckySettings = {
          documentLang: "en"
        };
</script>

2. Replace “en” with the desired 2-character language code (e.g., “fr” for French, “de” for German).

3. Ensure you add this code snippet above the CookieYes script.

By setting the documentLang property, you can override the default language and specify the desired language for the cookie consent banner.

Example

To display the German cookie consent banner on https://example.com/de and the English banner on https://example.com/, you can modify the code snippet as follows:

<script>
    if (window.location.pathname.startsWith("/de")) {
        window.ckySettings = {
          documentLang: "de"
       };
    }
</script>

For https://example.com/de, the language will be set as German. On https://example.com/, the English banner will be displayed by default, per the user’s preference. You can adjust the conditions prior to setting the language.

Translation for Standalone CookieYes Plugin Users

For standalone CookieYes plugin users without connecting to the CookieYes Web App, you can leverage its multilingual capabilities by integrating it with the Polylang or WPML translation plugins, as the CookieYes plugin is only compatible with these two plugins.

Integrating with Multilingual Plugins

  1. Install and activate your preferred multilingual plugin (Polylang or WPML) on your WordPress site.
  2. Configure the multilingual plugin and set up the desired languages for translating your website’s content.

Adding Languages to CookieYes Plugin

Once you’ve set up your multilingual plugin, you can add the desired languages to the CookieYes plugin’s language list:

  1. Head over to CookieYes > Dashboard > Language.
  2. Click the + Add Language button.
  3. Select the preferred language you want to add from the dropdown list. 
  4. Click the Add button.

Note

As a standalone plugin user, you can add only one additional language besides the default language. If you require support for more than two languages, connecting to the CookieYes Webapp. is recommended.

After adding the desired languages, the cookie consent banner will automatically display the translated content based on the user’s language preference.

Have more questions?

Reach out to us and we'll answer them.

Contact us