Skip to main content

FV Decipher Support

All the topics, resources needed for FV Decipher.

FocusVision Knowledge Base

Programming Multi-Language Studies

If you've never created a multi-language project, be sure to read the Guide to Programming Multi-Language Studies Overview, by clicking here.

1:  Adding Languages in the Language Manager

Using the XML editor? Click here to learn more.

The Language Manager is a tool in the survey editor which allows you to add and manage multiple languages in your project without using XML.  

The Language Manager allows you to import, export and edit translations for your survey. Translations can also be edited when the survey is being tested, by using the "edit" feature in the toolbar. To learn more, click here.

To access the Language Manager, select "Languages" from the build menu in the research hub or survey editor as shown below:

In the language manager you’ll be able to set/adjust the primary language of the project and add/manage additional languages and their translations.

1.1:  Setting the Primary Language

The primary language in the Language Manager should match the language that the survey was originally programmed with. Setting the primary language does not automatically translate all of the text in your survey to that language. Rather it automatically translates the system language resources available for that language (continue button, back button, help links, etc.).

To set the primary language, access the Language Manager in the survey editor. In the Language Manager, use the "Primary Language" drop-down menu to select the primary language for your survey:

Once you’re done, the system will automatically save the changes.

1.2:  Enabling Multiple Languages in the Survey Editor

Adding a new language to your project via the language manager is what allows the system to switch to a new language for your project.

Step 1: To add a language, access the Language Manager in the survey editor.

Step 2: In the Language Manager, click the "+Language" to see a list of available languages:

Step 3: Use the drop-down to select your desired language and click “Add Language” to to enable the new language in your project:

Step 4: After adding a language to your project, it’ll appear in the Language Manager:

From this screen, you can edit translations, export the translation file, import the translations back into the system, or remove the language from your project.

Note: You can add multiple languages to your project by repeating the process described above.

2:  Adding Languages in the XML Editor

Using the Language Manager? Click here to learn more.

You can activate the multi language system while working in the XML editor by utilizing the decLang and otherLanguages attributes. Read below for the full instructions on how to program your multi-language study with XML.

Reference Available Languages

Click here for more information on the language identifiers that might be accepted into the lang or otherLanguages attribute, the decLang variable, or the <languages> element. You will need to use the variable from the “decLang” column for setting the language in your survey via the methods below.

2.1:  Setting the Default Language

Note: If the base language for your project is English (US), then you can skip this step.

The lang attribute controls the master language for your project. Setting the master language does not automatically update all of the text for your survey to that language. Rather it automatically translates the system language resources available for that language. By default these resources are shown in English (US) to respondents who enter the survey without a decLang variable.

To change the default language of the study add the the lang attribute to the <survey> tag and assign a language (=”somelanguage”) as shown below:

alt="Apple Max Diff"
builderCompatible="1" compat="127" extraVariables="source,record,ipAddress,decLang,list,userAgent"

Search through the available languages, to see what values can be accepted into the lang attribute.

2.2:  Enabling Multiple Languages in the XML 

You can use one or both of the two following methods to enable multiple languages in your survey:

1. Using decLang in the Survey Link
2. Creating a Language Selection Question

2.2.1:  Using decLang in the Survey Link

decLang is a variable that gets added to the end of a respondent's survey link. When entering the survey, the decLang variable overrides the survey’s master language to display all text and system resource messages in the appropriate language.

For this method, you’ll need to add the otherLanguages attrubute to your <survey> tag. You can use the otherLanguages attribute to allow multiple languages in your survey. This attribute contains a comma-separated list of all other allowed languages for your project.

Additionally, adding otherLanguages creates an associated language.xls file for each attribute in the project (e.g. otherLanguages="french,german,turkish" looks for french.xml,german.xml and turkish.xml, respectively).

Create a survey with multiple languages (ex.: the English, French and German) by adding the the otherLanguages attribute to the <survey> tag and include your additional languages (=”language1,language2”) as shown below:

<survey name="Survey"
alt="International Study Q4"

Now you’re ready to use the decLang variable, which is automatically added to your project.

This section is for informational purposes only.

The decLang variable is located in the surveys 'extraVariables’ and ‘setup’ attributes, as shown below. If this variable is missing, then add it in both locations as shown in the example below. 

<?xml version="1.0" encoding="UTF-8"?>
<survey name="Survey"
alt="International Study Q4"

With decLang in place, we can pass the desired language into the URL and the system automatically sets the language in the survey. To set the survey to French, for example, add decLang=french to the end of your survey link.

e.g. /selfserve/9d3/proj1234?decLang=french

2.2.2:  Creating a Language Selection Question

You can create a question which allows respondents to select their language of preference. After the data has been submitted, the setLanguage function manually sets the language for the remainder of the survey.

With this method, all initial system messages (e.g. error messages, support form, etc...) are shown in the language that the respondent entered the survey with, until the respondent selects a different language at the language selection question.


<radio label="Q0" optional="0">
<title>Please choose your language preference:</title>
<row label="r1">English</row>
<row label="r2">Français</row>
<row label="r3">Deutsch</row>
<row label="r4">???</row>

if Q0.r2:
elif Q0.r3:
elif Q0.r4:

After the answer data is submitted from the language selection question, it is processed through the <exec> element which then assigns the language for the rest of the project.

Test the demo:

2.3:  Adding Languages Written Right-to-Left

Add the following XML style for countries whose languages are written right-to-left:

<style cond="decLang in ['hebrew','arabic']" mode="after" name="respview.client.css"><![CDATA[
 body { direction: rtl; }
 .survey-buttons { text-align: left !important; }
 #surveyContent, .survey-body, .question-text, .instruction-text,
 .grid.grid-table-mode .row-legend, .grid-desktop-mode.grid-list-mode .cell-section,
 .grid-single-col .cell, .grid[data-settings*='single-col'] .cell,
 .noRows .grid.grid.grid-table-mode .colCount-1 .element,
 .noRows .grid.grid.grid-table-mode .colCount-1 .col-legend { text-align: right !important; }
 .survey-body .fir-hidden { left: auto !important; right: -9999px !important; }

Click here to move on to the next phase of the multi-language studies guide: Best Practices for Programming Multi-Language Studies