Form Language¶
ODK Collect and XLSForm support multi-language forms.
To add additional languages to your XLSForm, add columns of user-facing content with language-specific columns.
All columns representing user-facing text or media can be multi-lingual:
- label
- hint
- media::*
- constraint_message
- required_message
Each language column adds two colons and the language name, followed by the two letter language code in parenthesis.
For example:
- label::English (en)
- hint::French (fr)
- media::image::Español (es)
Note
The text shown in Collect's user interface (e.g., buttons, menus, dialogs) is controlled by device language, not the form language. If you would like Collect's user interface to support your language, contribute translations at https://www.transifex.com/getodk.
XLSForm — Single language
type | name | label | hint |
---|---|---|---|
select_multiple colors | color_prefs | What colors do you like? | Select three. |
|
name | label | ||
colors | red | Red | ||
colors | blue | Blue | ||
colors | yellow | Yellow | ||
colors | green | Green | ||
colors | orange | Orange | ||
colors | purple | Purple |
XLSForm — Multiple languages
type | name | label::English (en) | label::Español (es) | hint::English (en) | hint::Español (es) |
---|---|---|---|---|---|
select_multiple colors | color_prefs | What colors do you like? | ¿Qué colores te gustan? | Select three. | Seleccione tres. |
list_name | name | label::English (en) | label::Español (es) |
---|---|---|---|
colors | red | Red | Rojo |
colors | blue | Blue | Azul |
colors | yellow | Yellow | Amarillo |
colors | green | Green | Verde |
colors | orange | Orange | Anaranjado |
colors | purple | Purple | Púrpura |


Warning
There is no fallback language.
If you have specified languages for a column, the non-specific version of that column will be treated as if it were a separate language. (The Default.)
menu will list it asTo avoid this, all columns that can be made multi-lingual need to be created as such for a multi-language form. For example, even if using the same image for a question prompt you will need a media::image::* column for each language. However, you may provide the same media filename for each.
Blank cells in a language-specific column will be blank in the form when that language is active, even if the "default" column has a value.
XLSForm — Multiple languages with media example
type | name | label::English (en) | label::Español (es) | media::image::Español (es) | media::image::English (en) |
---|---|---|---|---|---|
text | coffee | Do you want coffee? | ¿Quieres café? | mug_es.jpg | mug_en.jpg |
Switching languages¶
Typically, if multiple languages are available on a form, the form will display in the language set on the device.
To switch between available languages on a form, go to
.Note
Collect will remember the last language you switched to on a form, even if you switch device language.
Changing the form's language display will not change the device language. If you are in a context that requires switching languages often, make sure you know where to do this in your device's
menu.