How to Translate Your CookieYes Banner: Fixing Common Multilingual Issues
Content
Translating the CookieYes (GDPR Cookie Consent) banner for a multilingual WordPress site is a common challenge. Users frequently encounter issues where specific text strings don't appear for translation, the banner doesn't switch languages, or translations don't display correctly on the front end. This guide compiles the most effective solutions based on community support threads.
Why Do These Translation Issues Happen?
The problems often stem from a few key areas:
- Plugin Version: The newer "revamped" version of CookieYes handles translations differently than the older "legacy" version. Confusing the two is a common source of problems.
- Translation Method: Some text must be translated via the WordPress.org translation project, while other custom text is handled by multilingual plugins like WPML or Polylang.
- Web App Connection: For certain languages (like Arabic), a connection to the CookieYes web app is required for translations to become available.
- String Context: With plugins like WPML, you must select the correct string context (e.g.,
admin_texts_CookieLawInfo) to find all the translatable text.
Common Problems and Their Solutions
1. Can't Find Strings in WPML or Polylang
Problem: You've scanned for strings, but critical text like your custom cookie category descriptions or the banner message is missing.
Solution: Ensure you are looking in the correct string translation context. For WPML, navigate to WPML → String Translation and ensure the context is set to admin_texts_CookieLawInfo or a similar administrative context, not just the plugin's slug (cookie-law-info). For Polylang, check the strings under Languages → String translations.
2. "Show more," "Show less," "Save & Accept" Buttons Won't Translate
Problem: These common button labels remain in English even after using a translation plugin like Loco Translate.
Solution: These "static" strings are not translated through your multilingual plugin. They are loaded directly from the official WordPress translation repository. You must:
- Visit the CookieYes translation project page.
- Select your language and add the missing translations for these strings.
- Wait for a translation moderator to approve them. Once approved, they will be automatically delivered to your site via WordPress updates.
3. Banner Doesn't Switch Language with Page Language
Problem: You switch the page language using your multilingual plugin, but the cookie banner language stays the same.
Solution: This behavior is often tied to the lang attribute in your site's HTML.
- If you are not connected to the CookieYes web app, ensure your multilingual plugin is correctly translating the strings as described in solution #1.
- If you are connected to the web app, the banner language is determined by your site's
langattribute. A workaround is to manually set this attribute using a script. For example, you can conditionally set it for Italian:
<script>
if (conditionToShowItalian) {
window.ckySettings = { documentLang: "it" };
}
</script>
4. Specific Languages (e.g., Arabic) Are Not Available
Problem: You cannot select or see a translation for a specific language in the plugin's language tab.
Solution: For some languages, you must connect your plugin to a free CookieYes web app account. Once connected, navigate to the Language tab within the web app dashboard to add and manage additional languages.
5. Privacy Policy Link Points to Default Language Only
Problem: The "Read More" link in the banner always goes to the privacy policy page in the site's default language, even when viewing the site in a secondary language.
Solution: The current version of the plugin does not automatically detect a different privacy policy page for each language when a page is selected. The recommended workaround is to:
- In the plugin settings, under Customise Buttons → Read More, choose URL instead of Page.
- Manually enter the full URL for each language's privacy policy page (e.g.,
https://your-site.com/en/privacy-policy/andhttps://your-site.com/es/politica-de-privacidad/). Your multilingual plugin will then handle the correct link based on the active language.
Key Takeaways
- Identify Your Version: Know if you are using the legacy plugin or the newer revamped version connected to the web app, as their translation methods differ.
- Use the Right Tool: Use WPML/String Translation for custom text you entered, but use the official translate.wordpress.org site for the plugin's default button labels and common phrases.
- Check the Context: When strings are missing in your translation plugin, double-check that you are searching within the correct translation context.
By following these steps, you should be able to resolve the majority of translation issues and ensure your cookie consent banner is fully compliant and user-friendly in all your site's languages.
Related Support Threads Support
-
Language translationshttps://wordpress.org/support/topic/language-translations-6/
-
WPML – Can’t find how to translate neccessary & Optionally text with wpmlhttps://wordpress.org/support/topic/wpml-cant-find-how-to-translate-neccessary-optionally-text-with-wpml/
-
Translate Cookie Table Duration Unithttps://wordpress.org/support/topic/translate-cookie-table-duration-unit/
-
Allow GTranslate to Runhttps://wordpress.org/support/topic/allow-gtranslate-to-run/
-
Aggiunta Pulsante [] su contenuto messaggio banner non visibile in Traduzione enhttps://wordpress.org/support/topic/aggiunta-pulsante-su-contenuto-messaggio-banner-non-visibile-in-traduzione-en/
-
translate banner messagehttps://wordpress.org/support/topic/translate-banner-message/
-
Cant Translate text to Arabichttps://wordpress.org/support/topic/cant-translate-text-to-arabic/
-
Cookie Banner doesn’t translatehttps://wordpress.org/support/topic/cookie-banner-doesnt-translate/
-
Privacy Policy is not translateable with Polylanghttps://wordpress.org/support/topic/privacy-policy-is-not-translateable-with-polylang/
-
On other language the cookie settings bar is missinghttps://wordpress.org/support/topic/on-other-language-the-cookie-settings-bar-is-missing/
-
Make all texts translatablehttps://wordpress.org/support/topic/make-all-texts-translatable/
-
Translation of some static texts to Macedonianhttps://wordpress.org/support/topic/translation-of-some-static-texts-to-macedonian/
-
Some WPML translations do not appearhttps://wordpress.org/support/topic/some-wpml-translations-do-not-appear/
-
Where to translate Cookie settings buttonshttps://wordpress.org/support/topic/where-to-translate-cookie-settings-buttons/
-
WPML – Strings don’t show uphttps://wordpress.org/support/topic/wpml-strings-dont-show-up/
-
Message translation WPMLhttps://wordpress.org/support/topic/message-translation-wpml/
-
Wrong string language on home pagehttps://wordpress.org/support/topic/wrong-string-language-on-home-page-2/
-
Translation Issueshttps://wordpress.org/support/topic/translation-issues-57/
-
Translate privacy_overview_content and privacy_overview_titlehttps://wordpress.org/support/topic/translate-privacy_overview_content-and-privacy_overview_title/
-
User locale is ignoredhttps://wordpress.org/support/topic/user-locale-is-ignored/
-
Don’t understand how to make buttons and message in multiple languages.https://wordpress.org/support/topic/dont-understand-how-to-make-buttons-and-message-in-multiple-languages/
-
Show more / Show less is still not translated in frontendhttps://wordpress.org/support/topic/show-more-show-less-is-still-not-translated-in-frontend/
-
Partial translationhttps://wordpress.org/support/topic/partial-translation-9/
-
Few parts are not translatablehttps://wordpress.org/support/topic/few-parts-are-not-translatable/
-
Translate Privacy Overwiewhttps://wordpress.org/support/topic/translate-privacy-overwiew/
-
Polylang doesn’t see all strings?https://wordpress.org/support/topic/polylang-doesnt-see-all-strings/
-
[Bug] Message doesn’t change in Polylanghttps://wordpress.org/support/topic/bug-message-doesnt-change-in-polylang/
-
Cannot read property ‘replace’ of undefined TypeErrorhttps://wordpress.org/support/topic/cannot-read-property-replace-of-undefined-typeerror/
-
Translate scripts (to have a different script by language)https://wordpress.org/support/topic/translate-scripts-to-have-a-different-script-by-language/
-
Cannot edit certain entries/buttonshttps://wordpress.org/support/topic/cannot-edit-certain-entries-buttons/
-
Fixing automatic translationhttps://wordpress.org/support/topic/fixing-automatic-translation/
-
Translate with WPMLhttps://wordpress.org/support/topic/translate-with-wpml-19/
-
Missing translation of Cookie bar and popup messagehttps://wordpress.org/support/topic/missing-translation-of-cookie-bar-and-popup-message/
-
Where to download the PO files for different languageshttps://wordpress.org/support/topic/where-to-download-the-po-files-for-different-languages/