[Last updated January 23, 2019]
In this blog post I will describe how you can configure your Survey123 smart forms to support multiple languages. With multiple language support, end-users can pick the language for the questions presented in the form and you can get all their responses into a single feature layer. Multiple language surveys are authored in Survey123 Connect, but once published, they are supported in both the Survey123 web and field apps.
Multiple language surveys are created in XLSForms with Survey123 Connect
In order to add multi language support into a survey, you will use Survey123 Connect for ArcGIS. Survey123 Connect is a desktop tool that you can download into your Mac and Windows machine. Survey123 Connect works in combination with Microsoft Excel and lets you author smart forms following the XLSForm specification. Multiple language support is one of the many features of the XLSForm standard, and Survey123 works with it. If you are not familiar with XLSForm yet, I would strongly recommend you start with our XLSForm essentials, XLSForm video tutorials or this beginner exercise.
You can use Survey123 Connect to start a new survey from scratch, or to modify a survey you may have authored on the Survey123 web site.
How-to: A first look
The easiest way to understand how multiple language surveys are built is to look at an example.
- Open Survey123 Connect for ArcGIS
- Click on New Survey and select the Samples category
- Choose the Multiple Languages sample and open it
Note that in the Connect preview you will already see the language switcher in the top-right corner of the preview. You can use the language switcher to flip through the different languages. If you publish the survey, the language switcher will also be present in the Survey123 Field app as well as in Web Forms.
Multiple columns have been added into the XLSForm to translate the labels of questions. Each language is notated using a descriptive string for the language followed by its corresponding ISO 639-1 code enclosed in parenthesis. For example, the XLSForm column with the question label in Spanish will be label::Español(es), and the label in English will be label::English(en).
You can add translations to labels, but also to hints (hint::Español(es), hint::English(en)...), constraint messages and even images! For example, if you want to include an image with a diagram along with your question, you can use the image::Español(es) column to reference a diagram that has text in Spanish and the image:: English(en) column to include that same diagram with text in English.
|text||name||What is your name?||Ποιο ειναι το ονομα σου?||Type your name|
|select_one an||animal||What is your favorite animal?||Ποιο είναι το αγαπημένο σας ζώο;||Choose one animal|
Note: If you start adding language columns for your labels, make sure you add a language qualifier to all of them.
Similarly to how questions are translated in the survey XLSForm worksheet, choices in lists can also be translated. If you turn into the choices worksheet you will note that the same technique is used to translate the choice labels. Similarly to questions, if you are using the image column with your choices, you can translate it too.
By default, Survey123 will get the language code of your device’s locale settings and try to find the right column in your spreadsheet that matches that locale. This will automatically display your survey in the language that the end user is expecting.
If your survey does not include a translation for your device's locale, then the default_language value from the settings worksheet of your XLSForm is used.
Finally, end users can also manually change the language of the survey using a handy language switcher in the Survey123 field and web apps.
All the above is also nicely described in this new video tutorial created by James Moore.
Other important things to know:
- The language used by Survey123 Connect while authoring your survey will match the language you select in your form.
- Not everything in a survey can be translated to multiple languages. The title of the survey, for example, only supports one language.
- If you include media in your form (images, audio, etc), you also need to translate these columns.
- If you use select_one_or_other type of questions in your XLSForm, your translations will not apply to the ‘other’ choice. If you plan to use your survey in a language other than English, you should not use select_one_or_other and instead build that functionality manually by adding an 'other' choice into your list and then using a relevant statement to make visible the free text question for 'other' when that option is chosen.
- The language of your form defines the format of Dates in the calendar control.
- Create the whale survey—Monitor Whales with a Multilingual Survey | ArcGIS
- Multiple language support—Survey123 for ArcGIS | ArcGIS
[Update November 20,2017] A new learn.arcgis.com lesson on Multiple Language surveys has been published.
[Update July 20, 2018] Included list of 2-character language codes. As of version 3.0 (update July 2018) you can no longer specify languages outside the official ISO 639-1 list of 2-character codes. For any previously published forms, language codes outside the list will continue to work.
[Update December 19, 2018] Minor adjustments made here and there to more consistently use ISO 639-1 codes throughout the text.