Language override

Hi, I'm using Cloudflare Zaraz for cookie consent management. Whenever I manually open the consent modal using zaraz.showConsentModal(), it automatically picks the browser's language or locale. However, I need to override this behavior and specify a language manually when opening the modal. Is there a way to pass a language parameter to zaraz.showConsentModal() or any workaround to force it to open in a specific language? Any insights or suggestions would be appreciated. Thanks!
1 Reply
Mackenly
Mackenly3w ago
You can set it like this: https://developers.cloudflare.com/zaraz/consent-management/enable-consent-management/#overriding-the-consent-modal-language
<script> zaraz.set('__zarazConsentLanguage', 'en-US')
</script>
<script> zaraz.set('__zarazConsentLanguage', 'en-US')
</script>
Cloudflare Docs
Enable the Consent Management platform (CMP) · Cloudflare Zaraz docs
Your Consent Management platform is ready. Your website should now display a modal asking for consent for the tools you have configured.

Did you find this page helpful?