Hi, yes this can be achieved. Tealium consent has a method utag.gdpr.getLanguage which is used to determine language of the site (by default it's a browser language). To override default behaviour you have to do next: 1. Create a Javascript Extension with scope All Tags and Execution value Before Load Rules 2. Insert custom code so that language corresponds to the site language The example below is detecting language from the URL but it can be adjusted to use a cookie instead. /*URL based Consent Language */
utag.gdpr.getLanguage = function(promptData) {
var url = window.location.href;
var langMappingURLToTealium = {
'en':'en',
'cz':'cs',
'de':'de',
'it':'it',
'si':'sl',
'sk':'sk',
'fr':'fr',
'hr':'hr',
'pl': 'pl',
'ru': 'ru'
};
var langArray = ['en', 'cz', 'de', 'it', 'si', 'sk', 'fr', 'hr', 'pl', 'ru'];
var urlLang = url.split('#')[0].split('/');
/* index depends on the URL structure */
if (urlLang.length >= 4 && langArray.indexOf(urlLang[3]) != -1) {
return langMappingURLToTealium[urlLang[3]];
}
/* default behaviour */
var lang = navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage;
lang = (lang || "").split("-")[0];
return promptData.languages[lang] ? lang : promptData.defaultLang;
} Hope this is the answer you've been looking.
... View more