[Last updated January 23, 2020]
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.
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.
Next, open the XLSForm spreadsheet by clicking on the top icon of the left toolbar. This will open your XLSForm in your spreadsheet editor.
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:
media::image:tiếng Việt (vi)
[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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.