...
argument name | type | optional | value | description |
---|---|---|---|---|
command | string |
| ||
parameter | string | ✔️ |
| 2-letter country language code. Default value is |
callback | function | ✔️ |
| The callback function that is called with the function call result. |
...
This is a string holding the 2-letter code for the country language the publisher wants to act as the fallback language when an a user from an unsupported country language lands in the page. 'en'
, 'de'
, 'fr'
, 'pt'
, 'it'
are some of the possibilities to set as default. However, this set of supported languages may change given the consent zone (e.g., GDPR, CCPA) we are going to apply in.
...
Only 'en'
supported.
Description
When an a user enters the publisher site from a specific consent zone that needs to open the GUI and uses an unsupported language, AdConsent will fallback to the defined default language to show. This is by default English ('en'
). Using this function will allow the publisher to change it so, e.g., in a generic German-traffic site the default language to show when there's no matching supported language for the user visiting the site is German ('de'
) instead of English.
...
The function must be called before AdConsent shows the GUI. Calls after AdConsent has shown the GUI will be ignored.
Example
Setting the default language to be German (de)
Code Block |
---|
adconsent('setDefaultLocale', 'de'); |
...