Images for localization
Images can be used to localize ODK forms. There are many scripts that Android does not support (for example, many versions do not support Hindi text), but you can work around this using images of text. One way to create these images is to use our text renderer.
Adding media to a XLSForm
To add media files to an XLS form create a media::[media_type] column with the media’s filename. For example:
| survey | |||||
| type | name | label | media::image | media::video | |
| note | media_example | Media example | example.jpg | example.mp |
You can localize media by creating multiple media columns with language name suffixes (i.e. media::image::English)
Adding media to a XForm
Create an iText element with the media’s filename:
<text id="NameInHindi"> <value form="image">jr://images/name_in_hindi.png</value> </text>
Then in the body you can reference it like so:
<input ref="q1">
<label ref="jr:itext('NameInHindi')"/>
</input>
There are some examples of multimedia XForms available here. Take a look at Birds, Miramare, and New Widgets. These same forms are online at http://opendatakit.appspot.com if you want to try them out on a server.
Where to put the media files
As detailed in http://opendatakit.org/help/
Additional Notes
When you design a form, you can have a prompt consist of text, one image, one video, one audio clip
or some combination thereof.
You cannot have one jr:text definition in one language that you have defined with an image, and the same jr:text definition in another language you have defined only with text. Both prompts must have both images and text. It is fine if those definitions they are blank or empty. See this item on our issue tracker for more.
If you need to include multiple images on a page, there are two options. You can create a field-list to group multiple prompts together on a single page, or you can use image editing software to combine all your images into a single image.
