Documentation

Everything you need to know for quick Consentio implementation

Languages

Setting up multilingual support for the cookie banner

How the banner picks a language

The banner is shown in one of the languages you have enabled. Free and Solo use one language; Pro and Agency can enable more. With several languages enabled, the banner picks in this order:

  1. lang attribute on the <html> element
  2. The visitor's browser language
  3. Your default language

Supported languages

Consentio supports all 24 official EU languages including:

Language Code Language Code
Czech cs Slovak sk
English en German de
Polish pl Hungarian hu
French fr Spanish es
Italian it Portuguese pt
Dutch nl Swedish sv
Greek el Romanian ro
Bulgarian bg Croatian hr
Tip: You can find the complete list of languages in the dashboard under Banner Design → Texts, in the + Add language menu (Pro and Agency).

Enabling more languages

A new website starts in the language of your dashboard. On Free and Solo you pick the banner's single language in the place described below; on Pro and Agency you switch on each language yourself and choose which one is the default:

  1. Open Banner Design and choose your website
  2. Go to Texts
  3. Pick the language in the + Add language menu
  4. Click Save changes

Forcing a specific language

If you want a page to show the banner in a specific language, set the lang attribute on the <html> element. It has to be one of the languages you have enabled:

HTML
<!DOCTYPE html>
<html lang="cs">
<head>
  <!-- The banner uses Czech, provided Czech is enabled -->
  <script src="https://consentio.cz/widget/YOUR_SCRIPT_KEY/consentio.min.js" async></script>
</head>
...

Multilingual website

For websites with multiple language versions, we recommend:

Option 1: The lang attribute in HTML

Set the correct lang attribute on each language version:

HTML
<!-- Czech version -->
<html lang="cs">

<!-- English version -->
<html lang="en">

<!-- German version -->
<html lang="de">

Option 2: Dynamic setting

The banner reads the lang attribute once, when the widget starts. In an SPA or a dynamic website, set it before that, in an inline script in the <head>. A change made later applies from the next full page load:

JavaScript
// Get the current language from your application
const currentLang = getCurrentLanguage() // e.g. 'en'

// Set the language on the HTML element
document.documentElement.lang = currentLang

// The widget reads html[lang] when it starts; a later change applies after a full page load

Custom translations

You can edit the texts of every enabled language. The Free plan can edit the title and description; all texts open from the Solo plan:

  1. In the dashboard, go to Banner Design → Texts
  2. Click the tab of the language
  3. Edit the individual text strings
  4. Click Save changes

Available text for editing

Field Default text (EN)
Title We use cookies
Description We use cookies to enhance your browsing experience...
Accept button Accept All
Reject button Reject All
Settings button Settings
Modal title Cookie Preferences
Save button Save Preferences
Categories → Necessary Necessary
Categories → Analytics Analytics
Categories → Marketing Marketing
Categories → Functionality Functionality

Adding a new language

If you need a language that is not in the supported list:

  1. Contact our support at info@consentio.cz
  2. Alternatively, rewrite the texts of a language you have enabled into the language you need

Language detection

Among the languages you have enabled, the widget picks from these sources (in order of priority):

  1. HTML lang attribute - Highest priority. The widget uses the language defined in <html lang="cs">.
  2. Browser language - If the lang attribute is not set or names a language you have not enabled, the widget uses the visitor's browser language.
  3. Default language - If neither is among your enabled languages, the default language is used.
Tip: For best results, always set the correct lang attribute on the <html> element according to the current language version of the page.
Cookie CategoriesPublic API