Show rest of the survey in language selected in first question | XM Community
Question

Show rest of the survey in language selected in first question

  • 23 February 2024
  • 5 replies
  • 65 views

Badge +1

Hi there! I'm creating a survey and on the first page, I ask participants what language they want to take the survey in, English or Spanish (as a regular question, not through the translation dropdown box). I want the rest of the survey to be shown in the language they select. How do I do this?

 

Please note that I have some complicated conditions going on in this survey:

-I have a lot of block randomizations going on, so I don't want to have to branch and create new blocks in Spanish

-I want to keep responses given in English or Spanish in the same variable in the dataset, so I want to use the translation function, but the dropdown box that comes with that function does NOT work for me. I need the dropdown box to disappear and the language of the rest of the survey to match whatever participants select in the first question.

 

I have tried some of the JavaScript suggested in this thread, but it hasn't worked for me.

 

Thank you!


5 replies

Userlevel 7
Badge +21

The simplest option would be to create another survey just for selecting the language. Based on the language they have selected, you can redirect them to the other survey using the EoS element. Just add the Q_Language query string to indicate which language you want to show it in.

Take a look here: 

 

Badge +1

Thank you for that suggestion! I don't think that will work for me though, because I have a quota attached to this survey and I don't think would be able to track the quota across two surveys.

Userlevel 7
Badge +27

@alinedc,

You can use CSS to hide the language selector throughout the survey and use a MC question to select the language as the first question. Use JavaScript to update the language selector when a choice is selected.

I’m fairly certain this question has been asked before.

Badge +1

Hi @TomG - like I said, I've tried some JavaScript from a previous post and it didn't work for me. I'm new to JavaScript, so I may be doing something wrong. What code do I need to use and where? Would really appreciate your help!

Userlevel 7
Badge +27

@alinedc,

See this: https://gist.github.com/marketinview/0ef2b960210e739deb74e85339365114

It should work as long as you aren’t using Simple layout.

 

Leave a Reply