The embedded data and the survey language are provided by the survey link.
I built the following JavaScript code for the onload section, but it does not work.
Qualtrics.SurveyEngine.addOnload(function()
{
function translateInteraction() {
var s= parseInt("${e://Field/Q_Language}");
var i= parseInt("${e://Field/Interaction}");
var it= parseInt("{e://Field/Q_Interaction}");
if (s=="DE" && i=="Order Process") {
Qualtrics.Survey.Engine.setEmbeddedData('Q_Interaction', "Bestellprozess");
} else {
Qualtrics.Survey.Engine.setEmbeddedData('Q_Interaction', i);
}
}
//Translate submitted Interaction based on Survey Language
translateInteraction()
});
If the language is DE, the English text of the variable is displayed. If the language is EN nothing is displayed.
This is how the link looks like:
https://phenomenex.iad1.qualtrics.com/jfe/form/SV_afJGKCsvcJ0G6Eu?Interaction=Order%20Process&Q_Language=DE
And this is the question in Qualtrics XM
