Form_title in Multiple Languages Based on Language Selection

Hi,
I am using XLSForm with KoboToolbox. My form is ready but with one small translation problem. How can I have multiple form titles based on the selected language? My form is localized and supported in English and Arabic. All labels are currently translated. However, I can only have one form_title tag in the settings tab. Can my form_title be changed based on the selected language?

For example, if the form language is changed to English then the form title shall be displayed in English. If the user selects Arabic as the preferred language then the form title shall be changed to Arabic.

XLSForm settings tab is as follow:

form_title form_id default_language style
Qualifications Survey qualifications_form English theme-grid

Thanks!

I believe that the form title can't be translated. @abbyad and @yanokwa were discussing this recently. @abbyad mentioned these posts:


According to @yanokwa, this may be solved in the future in XHTML 2.0:

https://www.w3.org/International/geo/html-tech/tech-lang.html#ri20040728.121403792

That's true of ODK generally, but there's a chance that there's a KoBo-specific solution. You might ask about that on the KoBo Google Group or support forum.

1 Like

Thanks for your prompt response, Mathew!

Is there any hack around to solve this issue?

Not that I'm aware of, unfortunately.

1 Like

The hacks that I've seen are...

  • Put both languages in the title
  • Make language-specific forms
1 Like

Thanks Yanokwa.

I tried leaving the form_title blank and tried adding note with formatting as per xlsform design to show the form title. It works but it seems there is a problem with RTL when adding formatting. The formatting works well with English but with RTL languages, the form fields still remain on the left.

http://xlsform.org/#styling

What are you using to render the forms? Enketo? KoboCollect? ODK Collect? And what versions?

I am using the latest version of Enketo (1.55.5) to render web forms.

Thanks @Bhellali,

RTL is fully supported in Enketo so let's try to figure out what's going on. Are you using the language tag recommendation as mentioned here: http://xlsform.org/#language? This is helpful, because there are limits to auto-directionality-detection if there is e.g. a stray LTR script character.

2 Likes

I faced this issue (might be bug) when I was trying to find a hack around the translated form_title limitation. I added a new element with type note and then used xlsform styling # to make the text look bigger. The following two links show the difference with styling and without styling.

With styling: https://odk.enke.to/preview?form=http://82.196.7.170/downloads/9vlcbq7r/sample_survey.xml
Without Stying: https://odk.enke.to/preview?form=http://82.196.7.170/downloads/lk23rr15/sample_survey_without_styling.xml

I am also attaching both xls files.
sample_survey.xlsx (12.7 KB)
sample_survey_without_styling.xlsx (12.7 KB)

Thank you! Looks like a bug indeed. Will try to fix it soon. You can track it here: https://github.com/enketo/enketo-transformer/issues/40