Complianz with Polylang or WPML: a translated cookie banner and a cookie policy in every language
Short answer
Does Complianz work with Polylang?
Yes, in the free plugin too. The banner and the cookie policy are translated separately:
- Banner: save it once so its texts register, then translate the strings in group 'complianz' under Languages → Translations.
- Cookie policy: create a linked translation of the Cookie Policy page in each language with the same Complianz shortcode or block; Complianz fills in the document.
- With WPML the strings are in String Translation, a free add-on that comes with the Multilingual CMS and Agency plans.
- Banner stuck in one language? Clear the page cache and exclude Complianz's scripts from JavaScript delay and combining.
Polylang in 5 stepsFixes for a banner in the wrong language
Sources, read on : Complianz docs: translating with Polylang · Polylang docs: strings translations · WPML docs: translating strings · Complianz docs: excluding Complianz scripts and CSS from WP Rocket, LiteSpeed and other optimisers
Free scan: what loads on your site before consent?
Scan each language version (for example /de/ and /fr/) and see which cookies and trackers start before anyone clicks. No sign-up.
A multilingual Complianz setup is two separate jobs. The banner texts are strings: you save the banner once so they register, then translate them in Polylang or WPML String Translation. The cookie policy is a page: you create a linked translation of it in each language, and Complianz fills in the document in that language. Below are both routes step by step, checked against Complianz's, Polylang's and WPML's own documentation, plus the fixes for the two problems people hit most — a banner stuck in the default language, and caching or optimisation plugins.
Facts checked · Sources
Complianz + Polylang in 5 steps
- 1Add the languages, then update Complianz's translationsSet up your languages under Languages → Languages. On Complianz Free, go to Dashboard → Updates → Update translations afterwards, so Complianz's own texts download for every language.
- 2Save the cookie banner onceConfigure the banner in Complianz and save it at least once in your default language. Complianz says that's how its strings get registered for Polylang.
- 3Translate the strings in group 'complianz'Go to Languages → Translations (older Polylang versions and Complianz's guide call it Strings translations), filter on the group 'complianz', translate the message and button texts for each language and save.
- 4Create the cookie policy in each languageFinish the wizard so the original Cookie Policy exists. Under Pages, click the '+' for the other language: Polylang creates an empty page linked to the original. Give it a translated title, add the same Complianz shortcode or the Complianz legal document block, and publish — Complianz translates the document itself.
- 5Clear every cache and test each languagePurge your page cache and CDN, then open each language URL in a private window. Complianz's own advice is to test the translated banner in a private or incognito window after clearing the cache.
Watch a banner follow the page language
Polylang and WPML print the page language in <html lang>. A banner that reads it switches with the page, with no strings to register or translate. Switch the demo shop's language: this is PrivacyPill's banner doing what 'Match the page' does in our free WordPress plugin.
This is the real banner script running in a sandboxed demo shop; its tags are stand-ins that send nothing.
What the banner did
No choice yet: every Consent Mode v2 signal is denied and the demo's trackers wait.
Consent Mode v2 signals
ad_storagedeniedad_user_datadeniedad_personalizationdeniedanalytics_storagedenied
Trackers released
None: the demo's Google Analytics, Hotjar, Meta Pixel and TikTok tags are still blocked.
Try this
- 1Pick <html lang="de">: the shop reloads as a German page and the banner appears in German, as it would when a visitor opens your /de/ pages.
- 2Pick another language and close the banner with the X: the buttons and the X are in that language, and the choice is recorded as a refusal either way.
- 3Then check your own site: view the source of a translated page and look for <html lang> with that language's code. If it's missing or wrong, no banner can pick the right language.
Polylang vs. WPML: where each part lives
The same two jobs in both plugins, as their documentation describes them on 14 November 2026.
| Task | Polylang | WPML |
|---|---|---|
| Register the banner texts | Save the banner settings once | Complete the wizard and review the banner texts; WPML registers strings it sees on the front end |
| Translate the banner texts | Languages → Translations, group 'complianz' | WPML → Translation Dashboard → Other texts (Strings), domain 'complianz' (Complianz's guide); WPML → Translations → Strings in WPML's current docs |
| Extra plugin or plan | None — string translation is part of Polylang | WPML String Translation must be active: Multilingual CMS or Agency plan, not Blog |
| Cookie policy per language | '+' on the Pages list, translated title, same shortcode or legal document block | '+' on the Pages list, Advanced Translation Editor; only the title is translated, never the shortcode |
| Known catch | Duplicating the page isn't enough — it must be linked as the translation | A default language with a regional code (en-GB, de-DE) can swap banner languages |
Complianz documents both routes for its free and premium plugin. Premium 7.5.5 and later also downloads its own translation files automatically (Tools → Translations → Check Now).
How each tool picks the banner language
The difference that matters on a multilingual WordPress site: does the banner follow the page, or the visitor's browser?
| Tool | How it picks the language | What you translate |
|---|---|---|
| Complianz | Shows the page's language through Polylang or WPML string translation | Each banner string, plus a cookie policy page per language |
| Cookiebot | The visitor's browser language when auto-detect is on; data-culture forces one language | Banner texts per language in the Cookiebot Manager |
| CookieYes | WPML lists the standalone plugin as showing the default language whatever the site language; multilingual support comes with the paid web app | Translations in the CookieYes web app |
| PrivacyPill | The page's language (the <html lang> Polylang or WPML sets), then the browser's languages, then your default | Nothing for the six built-in languages; your own wording and policy link through Polylang or WPML string translation in the WordPress plugin |
Cookiebot and CookieYes rows checked 11 November 2026, Complianz 14 November 2026, against each vendor's documentation and WPML's compatibility listing — see Sources. PrivacyPill row updated 17 November 2026 for WordPress plugin 1.2.
Complianz + WPML, step by step
WPML needs its String Translation add-on for this: WPML says that without it, themes' and plugins' interface texts won't translate. It's included in the Multilingual CMS and Agency plans, not in Blog.
- On Complianz Free, update its translation files for your languages, then complete the wizard and review the banner texts in your default language.
- Translate the banner. Complianz's guide (27 October 2025) uses WPML → Translation Dashboard → Other texts (Strings): pick the domain 'complianz' and the source 'Frontend (viewed)', select the strings, click Translate your content and choose how to translate. Manual jobs then appear under WPML → Translations. WPML's own string guide (1 July 2026) shows WPML → Translations → Strings with a '+' per language instead — use whichever screen your WPML version has.
- Translate the cookie policy. Under Pages, click the '+' for the language and finish it in the Advanced Translation Editor with Save and Complete. In Complianz's words, "the shortcode itself cannot be translated. Only the document title string is localized" — the document content switches language on its own.
- Clear every cache and CDN, then test each language in a private window.
One WPML-specific catch: if your default language uses a regional code such as en-GB or de-DE, banner texts can show in the wrong language, because Complianz shortens every language code to two letters and WPML keeps the region. WPML's workaround is to register the banner strings as English, save the English banner texts, and then translate them into every language — including the default one. Changing the language code also works, but take a full backup first.
The banner stays in the default language
Work down this list; each item is a documented cause or fix.
- The strings never registered. Save the banner settings again (Polylang), or open a front-end page so WPML sees the strings, then look for group or domain 'complianz' — older Complianz guidance also mentions 'complianz-gdpr'.
- The translations exist but the cache is serving an old page. Purge the page cache, any server or CDN cache, and test in a private window.
- An optimisation plugin is delaying or combining Complianz's files. Complianz lists a banner "showing in the wrong language" among the symptoms, and asks you to exclude 'complianz', 'cmplz', its banner and TCF scripts and its CSS: in WP Rocket under File Optimization → JavaScript exclusions, in LiteSpeed under Page Optimization → Tuning → JS Excludes (and the deferred or delayed lists if you use them).
- Your default language has a regional code and you use WPML — see the workaround above.
- Something blocks the WordPress REST API. Complianz says it uses the REST API, and blocking it can stop the banner from appearing at all.
Caching plugins and multilingual pages
Complianz is built so that every visitor can get the same cached HTML: consent-dependent scripts are unlocked in the browser, not on the server. What has to differ between cached pages is the language, so give each language its own URL — Polylang's URL modifications setting offers a language directory, a subdomain or a separate domain; WPML offers directories, a domain (or subdomain) per language, or a language parameter. A page cache that stores pages by URL then keeps one copy per language.
WPML says WP Rocket needs no special configuration on a multilingual site, but suggests turning its optimisations on one at a time; that's when you'll notice whether Complianz's files need the exclusions above.
Browser-language redirects can confuse testing. Polylang only redirects first-time visitors on the home page and remembers the language in its pll_language cookie, so clear cookies between tests. WPML 5.3 and later keeps its redirect under Settings → URLs and SEO → Visitor language.
The cookie policy link opens the default language
First check that the translated policy page is published and linked as the translation of the original — in Polylang through the '+' (or by assigning a duplicate as the translation), in WPML through the translation editor. A copy that isn't linked is just another page.
Neither Complianz's Polylang guide nor its WPML guide documents how the banner picks the policy URL per language, so test the link on every language version after each change rather than assuming it follows.
How PrivacyPill's free WordPress plugin handles languages
Our free plugin works differently, and it helps to know where. It has the banner wording built in for English, Dutch, German, French, Spanish and Italian, and with 'Match the page' on it shows the language of the page — the <html lang> attribute Polylang or WPML prints — then the visitor's browser language. If you keep the built-in wording there are no strings at all, so the banner can't get stuck in the default language because a string was never saved.
If you write your own texts (version 1.2 and later), they're registered like Complianz's: with Polylang under Languages → Translations, with WPML under String Translation, both in the group 'PrivacyPill Consent Banner'. The headline, message, three buttons and the policy link are listed, so each language can get your wording and link its own policy page. A text you leave untranslated falls back to the built-in wording of that language, never to your main language. WPML needs its String Translation add-on for this, as for Complianz.
The trade-offs, honestly. The preferences panel and category descriptions keep the built-in translation. The policy link is a string, so you type each language's policy address yourself; it doesn't follow a translated page by itself. It doesn't write a cookie policy either — you keep your own policy pages. And six languages is the limit; Complianz covers many more.
Its settings are printed into each page, and it marks its script tags so WP Rocket, LiteSpeed, Autoptimize and Cloudflare Rocket Loader leave them alone, so there's nothing to exclude by hand. Developers who'd rather have the policy link follow the translated page automatically can use the privacypill_consent_config filter with Polylang's pll_get_post() or WPML's wpml_object_id hook:
<?php
// Link the PrivacyPill banner to the cookie policy in the page's language.
add_filter( 'privacypill_consent_config', function ( $config ) {
$policy_id = 123; // Your cookie policy page in the default language.
if ( function_exists( 'pll_get_post' ) ) {
$policy_id = pll_get_post( $policy_id ) ?: $policy_id; // Polylang
} else {
$policy_id = apply_filters( 'wpml_object_id', $policy_id, 'page', true ); // WPML
}
$config['policyUrl'] = get_permalink( $policy_id );
return $config;
} );Replace 123 with your page ID and test every language afterwards. The open-source banner the plugin bundles reads the page language the same way, and the hosted PrivacyPill banner adds your own wording per language in the customizer.
Leaving Complianz for other reasons too?
If translations are only part of it — a yearly licence per WordPress installation, Consent Mode v2 only on Premium, nothing outside WordPress — our Complianz comparison sets it against six alternatives, with free options, a cost calculator and a 15-minute switch guide that keeps your Consent Mode signals.
Check that every language works
View the source of a translated page and look for <html lang="…"> with the right code. Open the page in a private window: the banner should appear in that language, its policy link should open the policy in that language, and the free scan above should show nothing optional loading before a choice. Repeat for each language, and again after you change caching or optimisation settings.
Comparing cookie banner tools?
- PrivacyPill vs. ComplianzWordPress or any website, free or a one-time price, Consent Mode v2 on every plan.Complianz alternative
- PrivacyPill vs. CookiebotWhy people switch, six alternatives, a cost calculator and a 15-minute switch.Cookiebot alternative
- PrivacyPill vs. CookieYesUnlimited pageviews on Pro, no overage fees.CookieYes alternative
- PrivacyPill vs. Borlabs CookieAny platform, and €49 once instead of €49 a year.Borlabs Cookie alternative
Frequently asked questions
Sources
Facts on this page come from these pages, read on . Spotted something out of date? Write to kalmwerk@gmail.com and we'll correct it.
- Complianz docs: translating with Polylang
- Complianz docs: configuring for Polylang (save the banner to register strings)
- Complianz docs: translating with WPML
- Polylang docs: strings translations
- WPML docs: translating strings
- WPML errata: Complianz banner texts in the wrong language with a regional default-language code
- WPML: Complianz compatibility (tested with Complianz 7.5.6)
- Complianz docs: does Complianz work with caching plugins?
- Complianz docs: excluding Complianz scripts and CSS from WP Rocket, LiteSpeed and other optimisers
- Complianz docs: cookie banner does not appear
- Complianz docs: dynamic translation management in Premium
- WPML docs: optimising a WPML site with WP Rocket
- Polylang docs: URL modifications
- WPML docs: language URL format options
- Polylang docs: detect the browser preferred language
- Polylang docs: PHP constants (the pll_language cookie)
- WPML docs: automatic redirect based on browser language
- Polylang docs: function reference (pll_get_post)
- WPML hooks: wpml_object_id
- WordPress developer reference: get_language_attributes()
- Polylang source: language_attributes filter
- Cookiebot help: setting the banner language
- Cookiebot help: data-culture overrides auto-detect
- WPML: CookieYes compatibility
Also free
Rather self-host? Use the open-source banner
One 8.9 kB file under the MIT licence with Accept, Reject, categories and Consent Mode v2. It never calls our servers.
v1.2.1 · MIT · GitHub
What PrivacyPill costs
The free plan works today. Pro and Lifetime open soon — join the waitlist and we'll email you once when they do.
FreeAvailable now
€0forever
- 1 domain, 5,000 pageviews a month
- Consent Mode v2, 6 languages, consent log
LifetimeOpens soon
€49once
- 1 domain, unlimited pageviews
- Every future update, no renewals
ProOpens soon
€9/month · or €79/year
- Unlimited domains and pageviews
- Monthly rescans, geo-targeting
Try it on your own site
Design your banner, preview it live, and paste one line. Free for one domain.