Implementation Type: MLM: Multi-Language Management for Surveys in English or Spanish (the complete approach)

This page provides guidance for testing individual surveys set up to use MLM functionality, so the same survey can be completed in English or Spanish.

Setting up the surveys, setting up and testing the participant's language preference, and setting up and testing survey invitations are not included in this page.

Topics covered



Why Test

In order to validate the translations and confirm the setup of the MLM, you'll need to create test records to complete your surveys in English and Spanish. At this point, you are only testing the following:

  • The MLM has been set up for a survey
  • The translations have been entered
  • The survey can be completed by a participant in English or Spanish.

You are not testing the 1) the setup of participant's language preference, or 2) the set up of survey invitations.



How the MLM Works

To test MLM enabled surveys, you'll need to understand some basic underlying assumptions about how participants take surveys, because it informs MLM functionality, as well as some technical nuances about how the MLM component works, i.e. what's happening under the hood, when it comes to determining whether to display the English or Spanish translation of a survey.


Support Track Availability

This is advanced or optional functionality that can only be enabled or installed by a REDCap admin and requires special instruction & support.

Intended Audience & Prerequisites

Intended Audience

  • Survey project builders/project point persons setting up research projects participating in the pilot.

Prerequisite Knowledge & Experience

  • Basics & Survey trainings.

  • Working knowledge of the Online Designer, Survey Settings, and optional survey tools.

MLM: Underlying Assumptions 

The underlying assumptions that drive how the MLM works are:

  1. Participants complete their REDCap surveys on their own devices, such as their own phone or laptop.
  2. Participants have set up their device with a default web browser, such as Google or Firefox.
  3. Participants always use this same device and browser for taking all of their surveys.

MLM: Under the Hood

The language an MLM enabled survey is displayed in is managed by an http cookie. Until the cookie is set, an MLM enabled survey is displayed in English, which is the default language for all surveys in all projects.

What is a cookie? A cookie is a small text file that a website sends to your web browser and gets stored on your computer or mobile device. Websites use cookies to help improve your experience on their sites by remembering preferences you shared with them. Due to privacy and security considerations, the use of cookies by the REDCap website is very limited.

The MLM cookie is restricted in the following ways:

  • It does not save any information about a user, a survey participant, a survey, or even a REDCap project. 
  • It only stores the language preference.

The cookie gets stored for a specific browser on the specific device that the participant uses when responding to their MLM enabled survey. Basically, once the MLM cookie is set, it instructs the participant's device to tell the participant's preferred web browser to display their survey in either English or Spanish. 


We'll review the different options for triggering and enforcing the creation of the
MLM cookie in the section that covers setting the participant's language preference. Please note that for testing purposes you will use the language widget that is embedded at the top right of every page of every MLM enabled survey to set the cookie, and in turn display the survey in English or Spanish. We'll review the widget in the testing instructions.


Critical Concept for Testing

The key consideration to keep in mind when testing MLM enabled surveys is that REDCap is not tracking the language preference for each record you create to test a survey. REDCap is tracking the language preference for the browser you're using on your work device to complete your testing. 

To help understand the concept described above, review the following example of a workflow, taking note of the following caveats: 1) this workflow assumes you've never completed an MLM enabled survey on the device your using for testing, and 2) for the purposes of illustrating this workflow, we'll presume you're testing on your work laptop using Google.

  • Create your first test record for testing an MLM enabled survey.
  • Open an MLM enabled survey.
  • By default, it will be displayed in English.
    • Behind the scenes, on your work laptop, the MLM cookie will be stored for Google to track English as the language preference.
  • Check the English translation of the survey as you complete it and then submit it.
  • For the same record, in Google, open a different MLM enabled survey.
  • It will be also displayed in English.
    • This is because MLM cookie stored for Google is tracking English as the language preference.
  • On the survey, use the language widget to change the language to Spanish.
    • Behind the scenes, the MLM cookie stored for Google will get updated to set the language preference to Spanish.
  • Check the Spanish translation of the survey as you complete it and then submit it.
  • Create a new record.
  • Open any MLM enabled survey.
  • It will be displayed in Spanish. 
    • This is because the MLM cookie for Google has been reset to Spanish.

Moving forward with creating records and testing MLM enabled surveys, each time you change the language, the MLM cookie is reset to correspond to your selection, and any subsequent MLM enabled surveys you complete for any records will be presented in the last language you selected.

If you use a different browser or a different device that you've never used for MLM testing, the process of setting the MLM cookie on that device or for that browser begins again following the pattern outlined in the example workflow.  

If you've previously completed an MLM enabled survey for a different project on the same device and in the same browser you use to test MLM enabled surveys for your new project, the MLM cookie will be pre-set and the survey will be presented in the last language you selected for surveys you completed for the previous project.

 



Testing Instructions

Using the Language Widget Tool

You'll need to use the language widget tool for testing your MLM enabled surveys.

  • The widget tool is embedded in the top right corner on every page of every MLM enabled survey.


  • The widget label reflects the language in which the survey is being displayed.
  • Click the widget which will trigger two buttons to appear under the survey title, one for English and one for Spanish.


  • Click the language you want the survey to be displayed in.
  • The language will immediately switch and the buttons will disappear.
  • The widget label changes to reflects changing the language in which the survey is displayed.

Create a Test Record

  • Navigate to the MLM enable survey/form you want to test, and open it.
  • Click Save and Stay from the Save options in the top right of the page.
  • Click the Survey Options drop-down button at the top right of the form.
  • From the Survey Options at the top right of the form, select
    • Open survey




  •  - OR -

    • Compose survey invitation

Compare English and Spanish Translations

  • Use the language widget to switch the language the survey is displayed in between English and Spanish. 
  • Review all the elements of the survey for which you entered a Spanish translation, including the instructions, the title, and the fields.
  • Review all the elements of the survey the MLM tool has translated, such as the required message, buttons, pop-up messages, etc.
  • Close out the survey.

Complete the Survey in English

  • Follow the steps above to create a test record and open an MLM enabled survey.
  • If the survey is not displayed in English, use the language widget to change the language to English.
  • Complete the survey so you can review the English versions of the Survey Completion message.

Complete the Survey in Spanish

  • Follow the steps above to create a test record and open an MLM enabled survey.
  • If the survey is not displayed in English, use the language widget to change the language to English.
  • Complete the survey so you can review the Spanish versions of the submit button, the required pop up message, and the Survey Completion message.