Cookie banner

Cookie banner languages

Learn how to add another cookie banner language and why some visitors see a different language from the one you expect.

5 min read

CookieOfficer supports 30 languages. After you add a new language in the panel, the cookie banner is shown in it straight away. No extra translation is needed. In this article you'll find the rules by which the cookie banner chooses the language for each visitor, how to set one language for all visitors, and the language limit in your plan.

30 languages with ready-made texts

You can choose from 30 languages: Polish, English, German, French, Spanish, Italian, Dutch, Portuguese, Czech, Slovak, Ukrainian, Russian, Swedish, Danish, Norwegian, Finnish, Hungarian, Romanian, Bulgarian, Greek, Croatian, Slovenian, Lithuanian, Latvian, Estonian, Turkish, Japanese, Chinese, Korean and Arabic.

Each language has a complete set of ready-made texts: headings, descriptions, button labels, and cookie category names and descriptions.

You can edit the texts in each language in the cookie banner editor or on the “Languages & geo rules” page. In both places you switch the language with the bar above the fields. The article Cookie banner texts describes which text you change where.

The language set itself, the default language and automatic detection are configured only on the “Languages & geo rules” page.

How the cookie banner chooses the language

We determine the language in which the cookie banner is shown to a given visitor from several pieces of information. We check them in this order:

  1. A language you have set explicitly, if you have specified one.
  2. The lang attribute of the subpage, that is, the language declared by the page itself, provided you have turned on automatic detection.
  3. The visitor's browser languages. The browser sends a list of languages in order of preference, and we go through it one by one until we hit a language from your set.
  4. The project's default language, as a last resort.

At every step we only take into account a language that is in your set and has texts. We skip any language outside the set.

Example. Your project has Polish and English, and Polish is the default. A visitor whose browser is set to French will see the cookie banner in Polish, because French isn't in your set, and Polish is the default.

Setting one language for all visitors

By default, the cookie banner chooses the language according to the rules described above, so different visitors see it in different languages. You can turn this off in two ways.

Switch in the panel. On the “Languages & geo rules” page, turn off “Automatic language detection”. The cookie banner is then shown to all visitors in the project's default language.

Setting the language in code. Use this route if you want different languages on different subpages. How you do it depends on how you set up CookieOfficer:

Deployment methodWhere to enter the language
Code on the sitethe data-co-lang attribute on the script
Your own site codethe cfSettings.lang setting
Google Tag Managerthe lang field in the template, next to the project ID

If you set up CookieOfficer through Google Tag Manager, you set the language in the template field.

Example. You run a shop in Polish and in English, and each version has its own addresses. Many systems declare the same lang attribute on all subpages, so the cookie banner can't tell the language version from it. The browser then decides the language, and a Polish customer with an English browser will see the English cookie banner on a Polish subpage. Enter data-co-lang="pl" on the Polish subpages and data-co-lang="en" on the English ones, and the cookie banner will follow the language of the page.

Regional language variants

The cookie banner doesn't distinguish regional variants. The base language is what counts, and each language has one complete set of texts.

This means that a visitor whose browser is set to Brazilian Portuguese will see Portuguese texts, and a visitor with American English will see English texts. We don't distinguish variants of Norwegian either, and they all lead to Norwegian texts.

A language outside your set

The cookie banner is shown only in the languages added to the project. A visitor whose language isn't in your set will see the cookie banner in the default language.

Example. Your project has only Polish, and it is the default language. A visitor from Turkey will see the cookie banner in Polish.

Number of languages in your plan

The Free plan includes one language, the other plans all 30.

The limit applies to the number of languages, not to which language it is. An English-language shop on the Free plan can have its cookie banner in English.

The default language always stays. Trimming the list won't remove the language the cookie banner actually uses.

Moving to a lower plan doesn't delete translations. Languages over the limit disappear from the panel, but they stay saved and come back when you return to a higher plan.

The panel tells you outright when it has trimmed the list. The message reads “Saved N languages out of M: that's how many your plan includes”.

Right-to-left languages

We display Arabic, Hebrew, Persian and Urdu from right to left. Of these, Arabic is currently in the language selection.

When visitors will see the change

You confirm changes with the “Publish changes” button. They reach visitors' browsers within about five minutes, because the configuration is cached for that time.

Didn't find an answer?

Write to us. We reply on working days, usually the same day.

Contact us