Survey always in English (with multiple languages) | XM Community
Skip to main content

I have survey with translations and I want to make sure it always opens in English (at first link open). User can change language if they want but start screen should be English. Can it be done by setting embedded field Q_Language as EN-GB instead of uploaing language code as EN-GB for all participants?

Hi ​@PeeyushBansal, I think setting the embedded field Q_Language to EN-GB should get the task done.

Do let know once you try!


Hi,

Setting Q_Language to EN-GB in the survey flow won’t do anything. Instead, force the value in an argument in your survey link in your invitation email with something like this:

${l://SurveyURL}&Q_Language=EN-GB

 

 


I dont want to append at the end of link, is there any other way?


You could probably add custom javascript to your 1st question to select EN-GB on first load.


This should do the work, adjust the language you want to force at the beginning of the script.

Qualtrics.SurveyEngine.addOnload(function() {

const forcedLanguage = 'FR'; // Set the language you want to force (Qualtrics language code)

// Legacy layout: <select> inside .LanguageSelectorContainer
if (!sessionStorage.getItem('languageSelectSet')) {
const selectContainer = document.querySelector('.LanguageSelectorContainer');
if (selectContainer) {
const select = selectContainer.querySelector('select');
if (select) {
const optionToSelect = Array.from(select.options).find(
function(option) {
return option.value === forcedLanguage;
}
);
if (optionToSelect) {
select.value = optionToSelect.value;
select.dispatchEvent(new Event('change'));
sessionStorage.setItem('languageSelectSet', 'true');
return;
}
}
}

// New survey taking experience: dropdown with <li> items
const combobox = document.getElementById('language-selector');
const selectOption = document.querySelector('#menu-item-language-selector-' + forcedLanguage);
var displaySpan = null;
if (combobox) {
displaySpan = combobox.querySelector('span.rich-text');
}
if (combobox && selectOption && displaySpan) {
combobox.click();
selectOption.dispatchEvent(new MouseEvent('mousedown', { bubbles: true }));
selectOption.dispatchEvent(new MouseEvent('mouseup', { bubbles: true }));
selectOption.click();
sessionStorage.setItem('languageSelectSet', 'true');
}
}
});