Skip to content

Commit 53046e3

Browse files
authored
Update enable-consent-management.mdx (#18763)
Add information about consent language override
1 parent 7e276d5 commit 53046e3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/content/docs/zaraz/consent-management/enable-consent-management.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ In your Zaraz consent settings, you can add your consent modal text and purposes
2828
3. Select a default language of your choice. The default setting is English.
2929
4. In **Consent modal text** and **Purposes**, you can select different languages and add translations.
3030

31+
## Overriding the consent modal language
32+
33+
By default, the Zaraz Consent Management Platform will try to match the language of the consent modal with the language requested by the browser, using the `Accept-Language` HTTP header.
34+
If, for any reason, you would like to force the consent modal language to a specific one, you can use the `zaraz.set` Web API to define the default `__zarazConsentLanguage` value.
35+
36+
Below is an example that forces the language shown to be American English.
37+
38+
```html
39+
<script>
40+
zaraz.set('__zarazConsentLanguage', 'en-US')
41+
</script>
42+
```
43+
3144
## Next steps
3245

3346
If the default consent modal does not suit your website's design, you can use the [Custom CSS tool](/zaraz/consent-management/custom-css/) to add your own custom design.

0 commit comments

Comments
 (0)