2 language survey: how to change language drop down to a simple button? | XM Community
Skip to main content

Hello,
I have a simple 2 language survey (EN / AR) and was wondering if it was possible to replace the language drop-down by a button?
Such that if the respondent is answering the EN survey instead of showing "English" in the language drop-down it would directly state "عربي" and when the user clicks on it he is immediately redirected to the AR survey. Is this possible?
Otherwise, would it be possible to show the other language as default in the drop-down? So, if the respondent is answering the EN survey the language drop-down would show "عربي" instead of English...
Thanks a lot!
Ila


You would need to write JavaScript to do this.


Yes, you can use JS to hide dropdown and add a button instead, on click of this button you can change the drop down selection.


Thank you very much for your comments!
I have looked at another thread written by TomG https://www.qualtrics.com/community/discussion/1939/survey-language-setting-from-survey-question and adapted it... Now it only displays the other language but the link is not working. What I'm I missing?




FYI: if you are facing the same issue here is the best code I could write to solve this issue... It creates a button to switch between the two languages instead of having the drop-down. Small issue: button has the same wording in both translations.
To create a button that switches between the two languages with JS in the Look & Feel -> General -> header


In order to hide the language drop-down: https://www.qualtrics.com/community/discussion/247/how-do-i-remove-or-hide-the-language-selection-box-on-my-survey


How to remove the toggle dropdown and use a multiple choice question option in a multi-language survey for language selection on Qualtrics.

 

 

 

 

  1. Click on the question (language selection)
  2. Go to Look and Feel on the left panel of the survey
  3. Click on Style 
  4. Paste this in the Custom CSS box (this removes the toggle option at the top right corner).

.LanguageSelectorContainer{

display: none;

}

  1. Now click on the question
  2. Got JavaScript on the left pane
  3. Click on Java Script and paste this code below (if it’s more than 2, change as necessary;)

Qualtrics.SurveyEngine.addOnReady(function()

{

/*Place your JavaScript here to run when the page is fully displayed*/

 this.questionclick = function(event,element){

    if (element.type == 'radio')

    {

      var choiceNum = element.id.split('~')e2];

if(choiceNum==2)

{

jQuery("select

}

       if(choiceNum==1)

{

jQuery("select

}

 

jQuery("selectid='Q_lang']").trigger( "change" );

    }

  }

});


Leave a Reply