Overview of the Issue
When you use Complianz | GDPR/CCPA Cookie Consent on a site whose default language has a regional code, for example pt_PT, the cookie banner can show the texts of the other language. Portuguese pages show the English banner texts, and English pages show the Portuguese ones.
Complianz cuts every language code to two letters (pt_PT becomes pt), while WPML uses the regional code (pt-pt). The banner then looks up its texts under a language code that does not match the page language.
Sites whose default language has a two-letter code, for example en or es, are not affected.
Workaround
Register the banner texts in English, then translate them into all your site languages, also the default one:
- Go to WPMLString Translation.
- In Select strings within domain, choose the complianz domain.
- Select all the strings, open Change the language of selected strings at the bottom of the page, and choose English.
- Go to ComplianzCookie banner, set the banner texts in English, and save.
- Go back to WPMLString Translation, check that the complianz strings are in English, and translate them into your default language and your other languages.
- Visit the home page in each language as a logged-out visitor, and check that the banner shows the language of the page.
Another workaround: in WPMLLanguagesEdit Languages, change the default language code to two letters (for example pt instead of pt_PT). This changes the language code of your site, so make a full backup first.