I have created a form and have added a language as Hindi in it and have used Jrchoice function to display the field label but the problem when the user selects Hindi language while entering the survey, the calculated fields saves the data in Hindi language and not in English language. I dont know whether it is a bug or i am making any mistake.
Attaching the XLS Form and the snapshot of the data table which is saved in Hindi language.
Also attaching the xls form.
CSAT_Farmer-.xls (73.5 KB)
probably, there is no direct option, see https://docs.opendatakit.org/form-operators-functions/?highlight=jr%20choice#jr:choice-name says:
jr:choice-name( choice_name , ‘select_question’ )
Returns the label value, in the active language, associated with the choice_name in the list of choices for the select_question.
A workaround could be to create a second remapping choices list (putting english translation under the foreign language label (and the default) and do second calculations with jr:choice on THIS second list.
(Of course, also if(…(if…) could do the job. But I would prefer the choice list, for maintenance reason.)
Side-note: Recommended is explicit reference also for default.
name your label::language1 (code) , label::language2 (code)
Another hint: If the user changes the language during selection, labels already calculated will not change to the new language, (only if clicked again).