Multi Language Variables for Dynamic Content Campaigns
Is there a standard integration for Multi language campaigns.
My goal is to get Title, Text and so on in one campaign with multiple Languages.
- Variable DE
- Variable FR
- Variable IT
We in Switzerland have 3 Languages which we have to provide, so it would be really helpful when this would be in the Standard Settings.
What is the Best case to set up multi language without duplicating campaigns.
-
Hi Manuel,
There is a feature on the way to support this.
The best way, for now, is to have a JS code that is looking into the context lng parameter/URL and picking the lng variable for you. Basically you will have a translated variables in one template, rather than 3 experiences.
-
Hi,
We do not have an official reference for this. I would recommend that you will share the need with your CSM which might be able to provide you with something.
I'm not a developer BUT, In general, it will be something like
HTML
<div class = 'myTraslatedDiv'> </div>
JS
var lng = DY.recommendationContext.lng
lng1Text = ${DYVariableLng1Tex}
lng2Text = ${DYVariableLng2Tex}
lng3Text = ${DYVariableLng3Tex}
if (lng === lng1) {
append lng1Text variable to myTraslatedDiv
}
else if ...
-
another example:
var DY_VARIABLES = {
"en":{
"title":"${EN Banner Title}",
"img":"${EN Banner Image}",
"url":"${EN Banner click URL}"
},
"de":{
"title":"${DE Banner Title}",
"img":"${DE Banner Image}",
"url":"${DE Banner click URL}"
},
"fr":{
"title":"${FR Banner Title}",
"img":"${FR Banner Image}",
"url":"${FR Banner click URL}"
}
}
var bannerHtml = document.getElementById('dy-banner');
bannerHtml.querySelector('.dy_title').textContent = DY_VARIABLES[DY.recommendationContext.lng].title;
bannerHtml.querySelector('.dy_image').textContent = DY_VARIABLES[DY.recommendationContext.lng].img;
bannerHtml.querySelector('.dy_url').textContent = DY_VARIABLES[DY.recommendationContext.lng].url;
Por favor, entrar para comentar.
Comentários
4 comentários