Mobile SDK > Disconnected mobile application reference > SurveyQuestionXMLMDSC reference > Languages and locales
 
Languages and locales
Selecting an interview language
A scriptwriter can provide individual script translations, which provides several languages for the same interview. The Question XML can be retrieved in any of the available languages.
Interviewers are often capable of speaking multiple languages and require interviews to be displayed in the most appropriate language (for both the interviewer and the respondent). The most appropriate language might not be the mobile device's default language. In UNICOM Intelligence Interviewer - Offline for Windows, the interview's default language is selected based on the following rules.
1 If sample is used, check the Language sample field. If the language, that is specified in the Language sample field, is available in the script, use the specified language to display the first question.
2 Use the mobile device's language setting.
3 If neither of the previous rules are available in the script, use the default language (as defined in the metadata).
A scriptwriter can also change the script's IOM.Language property (see Setting the interview language) to a language that is based on a respondent question. The script to change the IOM.Language is a Script routing item that is available as text only, and is not converted to opcodes. When multiple interview languages are available, the mobile application can offer the interviewer a choice of languages before the interview begins. The default language can be preselected according to the language selection rules.
Handling locale specific data types
The Date and Double data types are locale specific. The data types can be displayed or entered differently, depending on the respondent's country and language conventions.
Date. The scriptwriting documentation requires script writers to enter dates into the script in either US English format or international standard (where the date is entered by using a number to represent the month). Either MM-DD-YY or YYYY-MM-DD are acceptable formats. When the Question XML is generated, UNICOM Intelligence uses the RFC3339 format (YYYY-MM-DDTHH:MM:SSZ) for all generated dates. Any XML that is sent back to the server must also use the same format. In the Question XML, the RangeExpression is taken directly from the script, and as such, is included in the format. The InitialAnswer, DefaultAnswer, MinValue, and MaxValue values also use the RFC3339 format.
Double. When the survey is authored, doubles are entered with a decimal point (.). When the Question XML is generated, the system uses the same format. Any XML that is sent back to the server must also use the format.
The mobile application must display values in the format that is expected by the respondent. The mobile application must also translate locale specific inputs into the correct formats when the upload XML is created. In UNICOM Intelligence products, the default locale is based on the interview language. However, the scriptwriter can also set the IOM.Language (see Setting the interview language) in the interview script. Because the Script item that sets the Locale is not available, the mobile application must use the same rules as other UNICOM Intelligence products (the default locale adheres to the interview language). However, interviewers might prefer to use a single locale for entering doubles and dates. The mobile application might provide a locale setting. For example, the options might include the following:
Use the locale that is associated with the language when dates and doubles are entered.
Always use the devices' locale setting when dates and doubles are entered.
See also
SurveyQuestionXMLMDSC reference