Skip to main content

Translations In CookieYes WordPress Plugin

Last updated on October 25, 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)

Note

As a user on the free plan, you can change the default language as needed, but only one language is supported at a time. If you require the banner in more than one language, connecting to the CookieYes Webapp and upgrading to a higher plan is required.

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:

Note

 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.

Changing the default language of your cookie banner

You can change your default language from the CookieYes plugin’s language list:

  1. From the top navigation panel of your CookieYes account, select Languages.
  2. Click on the three-dot menu and select Change Default Language.
  3. Choose your preferred language from the list and click Change.

After changing the default language, the cookie consent banner will automatically display the translated content.

Note

For existing standalone CookieYes Plugin users, once a language is removed, it cannot be re-added.

Have more questions?

Reach out to us and we'll answer them.

Contact us