You have installed Real Cookie Banner, but the cookie banner itself is for example displayed in English, although your website itself is in German? In this article, we explain how to change the language and possible problems with multilanguage plugins like WPML and Polylang.
Why is the wrong language used?
Real Cookie Banner is fully translated into the following languages:
- English
- German (formal and informal)
- French
- Italian
- Spanish
- Portuguese,
- Dutch (formal and informal)
- Czech
- Polish
- Danish
- Swedish
- Norwegian
- Hungarian
- Romanian
- Greek
- Finnish
- Slovak
The language of the cookie banner itself is based on the language of your website, which you can set in your WordPress backend under Settings > General. Most likely, if you have the cookie banner displayed in the wrong language, you are running your WordPress in a different language than the content you publish on your site.
If you change the language of your website afterwards, only new texts will be affected, e.g. when creating a new service. Existing texts remain unchanged because a change can have legal consequences.
You have changed the language of your WordPress. However, already existing texts in the cookie banner remain untranslated.
You haven’t set up Real Cookie Banner completely, or you want to save a lot of manual translation work? Since Version 5.0 you can reset the plugin texts in your WordPress backend under Cookies > Settings > Reset plugin and texts (link at the bottom left) > Reset texts. If you use a multilingual plugin like WPML, you can also reset only the texts of certain languages.
If you are using Real Cookie Banner version older than v5.0 you can reset the plugin completely in your WordPress backend under Cookies > Settings > Reset All (link at the bottom left), so that texts will be reinitialized.
Solution 2: Translate texts manually
You use a language for your website, for which Real Cookie Banner is not yet completely translated or won’t reset the complete cookie banner after chancing the website language? No problem! You can manually translate all texts of the different components that Real Cookie Banner displays on your website. At the following points you will have to translate texts:
- Cookie banner texts: All texts of the cookie banner itself are changeable in your WordPress backend under Cookies > Customize banner > Texts.
- Service groups: The different service groups (title, description) can be customized in your WordPress backend under Cookies > Services (Cookies) by selecting the group in the tab menu and then clicking on the pencil icon (edit).
- Services and content blockers: Texts for services and content blockers can be configured directly when creating or editing them in your WordPress backend under Cookies > Services (Cookies) and Cookies > Content Blocker.
Problems with WPML/Polylang
Real Cookie Banner is fully compatible with multilingual plugins like WPML and Polylang. But sometimes there are problems with these plugins. This is caused by an incorrect synchronization at the beginning of the installation of one of the two plugins.
One of these problems is noticeable by an error message such as Attempt to read property "slug" on null
. But also a wrong assignment of the service groups and services points to a faulty synchronization (see screenshot).
Unfortunately, it is not possible for Real Cookie Banner to trigger the synchronization automatically or correctly, since both WPML and Polylang do not offer any such API (technically speaking, the update and reading of the wpml-config.xml
directly after the installation of Real Cookie Banner).
Solution: You have to completely reset Real Cookie Banner in your WordPress backend under Cookies > Settings > “Reset all” to reinitialize all options, including the translation synchronization by WPML or Polylang.