How to automatically translate survey depending on answer instead of dropdown menu | XM Community
Skip to main content
Solved

How to automatically translate survey depending on answer instead of dropdown menu


Hi, I would like to translate a survey but without using the dropdown menu. Ideally I would like a first question asking users to select a language and depending on their answer (multiple choice with image) the next questions will be in the selected language. Preferably I would not want to create a survey flow with each question in multiple languages where I would create a huge database with multiple "questions" that are actually the same question but another language. Thanks in advance!

Best answer by TomG

You would still use the Qualtrics translate functionality. In your header, add a JavaScript that hides the language drop down on every page: ``` <script> Qualtrics.SurveyEngine.addOnload(function() { jQuery(".LanguageSelectorContainer").hide(); }); </script> ``` Then it comes down to the first question. To use a MC question to select the language, you would have to write JS to change the selected value in the hidden drop down based on the answer to the MC question.
View original

12 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5926 replies
  • Answer
  • November 12, 2018
You would still use the Qualtrics translate functionality. In your header, add a JavaScript that hides the language drop down on every page: ``` <script> Qualtrics.SurveyEngine.addOnload(function() { jQuery(".LanguageSelectorContainer").hide(); }); </script> ``` Then it comes down to the first question. To use a MC question to select the language, you would have to write JS to change the selected value in the hidden drop down based on the answer to the MC question.

NiC
QPN Level 5 ●●●●●
Forum|alt.badge.img+27
  • QPN Level 5 ●●●●●
  • 255 replies
  • November 12, 2018
Hi @LauraHill_95 First of all to hide the language select box i would rather use custom CSS than Javascript as on load of each page we can see the language selector loading and then being hidden you can add this code in Look and Feel > Style >Custom CSS #Q_lang { visibility: hidden; } For selecting a language you can either write code based for each question or a simpler route would be to create embedded Data (in my case this is 'Language') . Keep the first question asking language in different block now based on the response edit the vale of Language to the language code given below: https://www.qualtrics.com/support/survey-platform/survey-module/survey-tools/translate-survey/#AvailableLanguageCodes Now you can set the value for Language based on above value as shown in the picture below: !

NiC
QPN Level 5 ●●●●●
Forum|alt.badge.img+27
  • QPN Level 5 ●●●●●
  • 255 replies
  • November 12, 2018
you can test this in a survey given below : https://ugamsandbox.ca1.qualtrics.com/jfe/preview/SV_816qmdwUCQ37QEZ?Q_SurveyVersionID=current&Q_CHL=preview And there was a final step which this website wouldn't let me post (access denied message) so am attaching a text file with further instructions

@NiC @TomG : Thank you for your help!

Forum|alt.badge.img+3
  • 9 replies
  • March 5, 2019
Hello, I just tried this suggestion and the survey link you shared (Is it still working?). In my case, neither of both worked. Are there any limitations to the browser or maybe something changed in Qualtrics? Thank you

NiC
QPN Level 5 ●●●●●
Forum|alt.badge.img+27
  • QPN Level 5 ●●●●●
  • 255 replies
  • March 6, 2019
Hi @ecd921 Seems that some things have changed behind the hood in Qualtrics. I will take a look at this and message you on your recent thread if i find a solution.

Forum|alt.badge.img+3
  • 9 replies
  • March 6, 2019
Thank you NiC! I look forward to hearing from you.

CarolK
Level 5 ●●●●●
Forum|alt.badge.img+42
  • Level 5 ●●●●●
  • 406 replies
  • December 21, 2021

Is there any update for this? It appears that Qualtrics no longer lets you pass a value to "Language" in this way. I have also noticed that Q_lang, which works in the URL, does not work once selected and set in the survey flow.


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5926 replies
  • December 21, 2021

https://community.qualtrics.com/XMcommunity/discussion/comment/42485#Comment_42485Not sure what you are trying to do, but you are correct that Q_lang in the url (or Language in the contact list) will set the initial value. After that, you can control the language programmatically by using JS to set the value of the language selector. The current language will always in the embedded field Q_Language.


CarolK
Level 5 ●●●●●
Forum|alt.badge.img+42
  • Level 5 ●●●●●
  • 406 replies
  • December 21, 2021

TomG
"....you can control the language programmatically by using JS to set the value of the language selector. "
Currently, I have used CSS (which I believe you posted to another question a fellow user asked, so thank you for that) to turn off the language dropdown, because there is sensitivity that not all languages be available to all respondents).
I am not sure how to accomplish a scenario in which depending on a combination of Location settings or responses, only select languages should be offered to respondents (EG: if Location=1 OR Q1=1, available language should be English only, but if Location=2 OR Q1=2, available Languages should be EN or TH only, if Location=3 OR Q1=3, available Language should be ZH-T only).


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5926 replies
  • December 21, 2021

https://community.qualtrics.com/XMcommunity/discussion/comment/42489#Comment_42489Unfortunately, not all browsers support hiding select options. You can use JS to customize the language select. Start by piping Location and Q1 into your JS then based on the values do the following:

  1. If only one language should be available select the language and hide the select container.

  2. If more that one language should be available:

  3. If the current language is not one of the available languages, select one of languages as the default default language

  4. Disable AND hide the language options that shouldn't be available. On some browser they will be hidden and on others they will just be greyed out and not selectable.

You'll need to run the JS on every page (except on the Q1 page). Therefore, it would probably be best to put it in the header or footer.


Forum|alt.badge.img+1
  • 2 replies
  • July 23, 2022

Here's the solution we are setting up: The language question is a pre-survey, and uses an automatic redirect with the language code to the main survey. (Haven't fully implemented yet, but our initial tests are working).

  1. We will send out a single anonymous link to participants .

  2. The link will go to a Language pre-survey asking users to select a language (multiple choice with image)

  3. Create a separate "Branch" for each language answer.

  4. Create an "End of Survey" element for each "Branch". Customize to redirect to the main survey with the selected language's code added to the end of the main survey's URL:

  5. https://community.qualtrics.com/XMcommunity/discussion/6532/how-to-set-end-survey-message-to-redirect-to-different-urls-depending-on-eligibility

  6. https://www.qualtrics.com/support/survey-platform/survey-module/survey-tools/translate-survey/#SpecifyingTheParticipantLanguage

  7. This will automatically redirect the participant to the main survey, and use the translation for the participant's selected language.

  8. In the main survey, we set the Q_Language from the URL to use as embedded data. The main survey will also be able to use the language code for logic in the survey (e.g., display question, branching, etc.) if needed.

  9. https://www.qualtrics.com/support/survey-platform/survey-module/survey-tools/translate-survey/#DataAnalysisForTranslatedSurveys

Pre-Survey Qualtrics redirects with codes.JPG


Leave a Reply