I’ve designed an xls form with 2 languages (French as default, English as second language). The form includes constraints and constraints messages. Is it possible to have those messages displayed according to the active language? (for example, if French is the active language, I’d like the constraint message to be in French; if the active language is English, I’d like them to be in English).
Thank you for any help!
See Help Center article: Adding Another Language to your XLSForm — KoboToolbox documentation
You can do the same as described there for labels and hints also for messages.
Thanks a lot for the quick response! I’m still facing the same problem though. Translation works perfectly for labels and hints but not for constraint messages Any idea why this may happen?
could you send a related example of your xlsform, please. (Column title and cell for the message and the constraint in Excel XLSForm).
You need to have a ::language column per language for each message type, i.e. constraint_message::French (fr) and constraint_message::English (en) and the message text in the corresponding cells.
- Is the message working for any language?
- What do you use: Collect or Enketo?
Sorry for the late reply. I attach a very simplified version of the form I’ve designed. Second language (creole) works perfectly for labels and hints; for choices labels too. But still does not work for constraint messages: the message appears when needed but it shows both languages together (rather than one or the other). I’ve tried several things to fix the situation: change the name of the languages, add the language code in brackets (fr)/(ht), put “::” instead of “:”, etc.). But I didn’t find the solution.
Currently, to test the form, I’m using Kobo Collect on my Android phone.
Thanks again for your help!
add _underline in the column names, please: constraint_message.
For example: constraint_message::Français (fr)
(In general, KoBo column and variable names do not have spaces).
See also examples in KoBo Help Center Adding Another Language to your XLSForm — KoboToolbox documentation
and in XLSForm documentation XLSForm Docs
A bit strange that it works with space (and one : ) in Enketo and the Online validator doesn’t give a warning for that.
You can also add the language code (fr) …
For codes see: Language Name and Code - #3 by wroos
Thanks a lot! It works perfectly now, no spaces in the column names. Sorry I didn’t figure this out on my own