Use a single choice question to ask participants to select a language, then add the language script to the question to set the survey language. After the participant chooses the language and clicks Next, the rest of the survey will appear in the selected language.
Notes:
- The language script only switches the survey language, not the PanelistCulture. Therefore, it can be use with all types of sample.
- All language options presented in the single choice must be supported on your community and have a skin/environment associated to them.
- Make sure all languages required for the study have the status Completed under the Languages tab.
Example
You have a Single Choice question that asks a respondent to choose a survey language. The options are English, Spanish and French. Once the respondent chooses a language and clicks Next, the rest of the survey will be shown in the selected language.
Detailed Steps
How to find out skin/environment names in your community
- Click the Languages to ensure all languages required for the study have a status of completed.
- Click the Sampling/Deployments tab of the study.
- Click Edit in the Default Test Link row.
- From the Language list, select a language
- Check Skin list for available skin/environment names for the selected language
Note: That same skin/environment can have multiple languages.
Create language and environment questions
- Create a Single Choice question (standard or visual) to ask participants to select a language (Q_LANGUAGE).
- Use the answer options to list the languages available in the study.
- Change precode of each answer option to the corresponding language code. For a list of language codes, please refer to this article from our WebHelp.
- Create a hidden Single Choice question (Q_ENVIRONMENT).
- Use the answer options to list the environment names. The environment names are case-sensitive and must align with with corresponding languages you just added in step 2.
- Authored questions should look like this:
Q_LANGUAGE Q_ENVIRONMENT - Copy the script below into a text editor such as Notepad.
- Change Q_LANGUAGE to the name of your language question created in step 1.
- Change Q_ENVIRONMENT to the name of your environment question created in step 4.
- Insert the completed script into the Script section of your language question by doing the following:
- Select the language question in the Questionnaire Tree.
- In the Scripting section of the question, click Edit Scripts.
- Click the On Exit tab and paste the script.
- Click Save.
- Validate and test your survey.
Script
/* Script Name: How do I allow respondents to choose their survey language? To ensure your script works as expected, always copy the original script from the script library found in the support portal. Failure to use the most up to date script from the script library may cause unexpected results. */ ChoiceQuestion cq_choose = Q_LANGUAGE; ChoiceQuestion cq_hidden = Q_ENVIRONMENT; Set(cq_hidden, (int) cq_choose); this.Culture = cq_choose.SelectedAnswer.Code; this.Environment = (cq_hidden.SelectedAnswer.Html).Trim(); Save();
More Information
Please click the WebHelp links below for more information:
Comments
0 comments
Article is closed for comments.