ichivite-esristaff

Introducing Multiple Language Surveys

Blog Post created by ichivite-esristaff Employee on Nov 16, 2016

In this blog post I will describe how you can adapt your Survey123 smart forms to multiple languages. This is useful in scenarios where multiple languages are spoken among your field crews. It can be handy also if you want to momentarily switch the language of your survey for a respondent to read questions more easily. Survey123 supports multi language forms, meaning that you can switch the language in them: One form, multiple languages…

 

Using multi language surveys in the Survey123 field app

 

The Survey123 field app will show a language switcher in the top-right corner if your survey has been configured to support multiple languages. As you will learn shortly, you can even make the Survey123 field app automatically default to the correct language based on the device’s locale. From a field user perspective, there is really not much more to it than that… a simple switch makes the trick.

 

Note that the language switcher defines the language to be used in the survey, which is different from the language used by the app. The language used by the app is defined by the locale of your device. We at Esri make sure the app uses the device's language. As far as the survey goes, it is  all on you.

 

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. Multi 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, our 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.

 

  1. Open Survey123 Connect for ArcGIS
  2. Click on New Survey and select the Samples category
  3. Choose the Multiple Languages sample and open it

 

Note that in the Connect preview you will already see the language switch in the top-right corner.

 

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 to translate the labels of questions. Each language is notated using its corresponding ISO 639-1 code.  For example, the XLSForm column with the question label in Spanish will be label::es, and the label in English will be label:en You can add translations to labels, but also to hints (hint::es, hint::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::es column to reference a diagram that has text in Spanish and the image::en column to include that same diagram with text in English.

 

typenamelabel::enlabel::elhint::en
textnameWhat is your name?Ποιο ειναι το ονομα σου?Type your name
select_one ananimalWhat is your favorite animal?Ποιο είναι το αγαπημένο σας ζώο;Choose one animal

 

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.

 

list_namenamelabel::enlabel::zhlabel::ellabel::es
andogdogσκύλοςperro
ancatcatγάταgato
anbirdbirdπουλίpájaro
anfishfishψάριpez

 

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. In this way, the survey will by default open in the language that matches the device’s locale. You can overwrite this behavior by defining the default language in the settings worksheet of your XLSForm.  The language switcher in the Survey123 app will let users switch to any of the available languages defined in your form.

 

form_titleform_idinstance_namedefault_language
Multiple Languagesen_US

 

Other important things to know:

 

Not everything in a survey can be translated to multiple languages. The title of the survey, for  example, only supports one language.

 

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. There are some additional details in our help.

 

The language of your form defines the format of Dates in the calendar control.

 

[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.

Outcomes