The Multi-Language Management Tool (MLM) allows project designers to configure a project with multiple available languages without the need to create multiple instruments for each additional language. Designers would choose a language selection method which respondents can use to dynamically change the language of a single survey interface, or it would be forced through the use of the @LANGUAGE- action tags.
This article will focus on adding language fields with @LANGUAGE action tags to interact with MLM settings. If you have not read the Multi-Language Management Tool (MLM) - Basic System Settings article, please start there.
Jump to:
Setting Language
There are several possible elements that can influence the language selection in a record, form, or fields. These are listed below, generally in order of most powerful to least powerful. In this case, "most powerful" would mean the most likely to override the options below it on the list.
Language Widget
After configuring the MLM settings, a language widget will become available on data entry forms and surveys that have been toggled to active.
Data entry view
Survey view
Selecting a language from the widget will convert to the translation configured for the selected language.
When using only the language widget, the survey/participant side and the data entry/staff side will operate independently. If a respondent chooses to complete the form in another language, it will not change the language that staff see the form for that record. If you would like the data entry side to retain the language selection by each participant, consider using a language field with @LANGUAGE-SET, described below.
Language Field (@LANGUAGE-SET)
If you would like the respondent to select the language from a field in your survey rather than the language widget, you will need to create a radio or dropdown field in the project. Take note of the ID and display name of the languages in your MLM configuration:
The radio button or dropdown field should possess the ID as the raw value and the display name as the response label.
Then, in Action Tags, add @LANGUAGE-SET. This action tag will permit the field to change the display language.
Here is an example with no selection (my default language is English):
Here is an example with Spanish selected:
And here is an example with English selected:
You may also use @LANGUAGE-SET-FORM or @LANGUAGE-SET-SURVEY to accomplish the same language selection functionality, but limiting the effect to either the data entry/staff end or survey/participant end.
Browser Cookies
When a respondent or user makes repeat visits to CU Anschutz REDCap, a language cookie value is preserved while in the same session. On those additional visits, that information will be saved and the language preference will be retained by default.
NOTE: When testing your MLM configuration, clear your cache and open a new, private browser window to ensure that you are observing fresh behavior as opposed to behavior resulting from browser cookies. Browser cookies may overpower the last language selection option.
Other Back-Up Fields
When the other options listed above are absent, the system may default to another language field.
You may have noticed a "language preference field" in the MLM settings that was not covered in Multi-Language Management Tool (MLM) - Basic System Settings.
The language preference field can be used such that when all other information is lacking - such as a widget selection, a language field on the survey, and browser cookies - the system can rely on a field in the record where language has been previously selected. For example, this may be useful if you have Automated Survey Invitations that send after period with no interaction from the participant on a survey with no language selection field.
It is important to note that browser cookies will override the language preference field. Please see the "NOTE" under Browser Cookies.
Other language action tags:
@LANGUAGE-CURRENT-FORM/@LANGUAGE-CURRENT-SURVEY
@LANGUAGE-FORCE/@LANGUAGE-FORCE-FORM/@LANGUAGE-FORCE-SURVEY
Next Up
Learn to use source code to make your translation text appear in identical formatting compared to your default language formatting in Multi-Language Management Tool (MLM) - Formatting Translations.