Docs menu
Banner languages
CookieHug banner multilingual support: automatic language detection, forcing a language and the list of supported languages.
Multi-language Support
Automatic Language Detection
CookieHug automatically detects the visitor's language using the following priority:
- Forced language —
data-cookiehug-langattribute on the script tag (highest priority) - User preference — saved in
localStorage(cookiehug_language) - HTML lang attribute —
<html lang="en"> - Browser language —
navigator.language - Default — Polish (
pl)
Forcing a Language
Use the data-cookiehug-lang attribute to override all detection methods:
<script
data-cookiehug-lang="EN"
src="https://cookiehug.com/api/script/YOUR-LICENSE-KEY.js">
</script>The attribute is case-insensitive ("EN", "en", "En" all work).
Supported Languages
| Code | Language |
|---|---|
pl | Polish |
en | English |
de | German |
ru | Russian |
uk | Ukrainian |
Additional languages can be configured through the CookieHug dashboard.