...
argument name | type | optional | value | description |
---|---|---|---|---|
command | string |
| ||
parameter | object |
|
| |
callback | function | ✔️ |
| The callback function that is called with the function call result. |
...
The path to the translation files. This location can be the publisher's own website or somewhere else in on the internet. It should point to a folder where all the custom translations for this particular consent law api API are located though. The translation files for a particular consent law api API cannot be stored in different folders.
The translation files need to be in JSON format (check the structure for each consent law GUI below) and named after the 2-letter code for each country language the publisher wants to customize. So, e.g., a custom translation file for German should be named de.json
, an English one should be named en.json
, and so on.
...
This is an array holding the 2-letter code for each country language the publisher wants to custom customize their labels. Some of the possibilities include 'en'
, 'de'
, 'fr'
, 'pt'
, 'it'
between others, and depend on the consent law we are configuring. Only languages with the corresponding custom translation files available should be added here. If that's not the case, when AdConsent tries to fetch the file it will fail and will default to the default translation for that GUI.
...
Any user language outside of this set cannot be customized, and the GUI will show in its default language. To change the GUI default language, please check the setDefaultLocale function usage.
The GDPR GUI only allows to customize and translate a subset of text due to legal reasons, in order to guarantee the usage of certain terms in certain places. Customization supports the welcome title and welcome text in AdConsent using enableWelcomeText, along with the publisher consent tab label, description, and existing custom purposes that may have been set in the setPublisherPurposes function.
Code Block |
---|
{ "welcomeTitle": "My custom welcome title", "welcomeText": "My custom welcome text", "publisherTitle": "My custom publisher tab title", "publisherText": "<p>Custom Publisher text, allowing <a href='http://www.snigel.com' target='_blank'>links</a> and HTML in general<p>", "customPurposes": [{ "id": 1, "name": "Translation for custom purpose 1 name", "description": "Translation for custom purpose 1 description", "descriptionLegal": "Translation for custom purpose 1 legal description" }] } |
...
The text between the tags %$PPLS$%
and %$PPLE$%
is used as the link label to the privacy policy. The underlying link is configured using setPrivacyPolicy.
Just as in GDPR, the publisher may provide all or just some of the labels in the JSON file. However, doing so will lead AdConsent to load the missing labels in the default language, English.
...
The function can be used to configure different customized text and translations for GDPR and CCPA. Depending on the privacy framework used, the number of supported languages and the level of customization differs. This means there are different sets of translation files for GDPR and CCPA, and setting these translations must be done from within each specific consent law api API (e.g., adconsent.gdpr()
, adconsent.ccpa()
).
...