# Multilingual in CSV File

**URL:** <https://forum.odk-x.org/t/multilingual-in-csv-file/1177>\
**Category:** Support\
**Tags:** odk-x-survey\
**Created:** [March 9, 2021, 2:01pm UTC](https://forum.odk-x.org/t/multilingual-in-csv-file/1177 "2021-03-09T14:01:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmuchuchuti](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/cmuchuchuti/32/356_2.png) [@cmuchuchuti](https://forum.odk-x.org/u/cmuchuchuti)\
**Post date:** [March 9, 2021, 2:01pm UTC](https://forum.odk-x.org/t/multilingual-in-csv-file/1177/1 "2021-03-09T14:01:11Z")

</div>

Dear team;

I am wondering if there is a way to put multilingual options for my CSV file where I am pulling **select\_one/select\_multiple**.  
Would appreciate any help.  
Thank you!!

Cephas.

---

<div class="post-metadata">

**Author:** ![linl33](https://odkx.b-cdn.net/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@linl33](https://forum.odk-x.org/u/linl33)\
**Post date:** [March 9, 2021, 3:26pm UTC](https://forum.odk-x.org/t/multilingual-in-csv-file/1177/2 "2021-03-09T15:26:50Z")

</div>

Hi @cmuchuchuti,

You can modify your csv query callback to include translations. But first you need to define the locales following [Internationalization — ODK-X Docs](https://docs.odk-x.org/internationalization/). There are 2 ways to modify the callback:

1. Include the translations in your csv. In your callback specify where to look for the translations, in the display object return (this example uses `es` as an example)

```auto
{title: {text: {default: "TEXT", es: "TEXT in ES"}}}

```

1. Include the translations in `table_specific_translations` or `common_translations`. In your callback specify the translation key, in the display object return

```auto
{title: {text: "TRANSLATION_KEY"}}

```

---

<div class="post-metadata">

**Author:** ![W\_Brunette](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/w_brunette/32/376_2.png) [@W\_Brunette](https://forum.odk-x.org/u/W_Brunette)\
**Post date:** [March 9, 2021, 8:32pm UTC](https://forum.odk-x.org/t/multilingual-in-csv-file/1177/3 "2021-03-09T20:32:42Z")

</div>

@cmuchuchuti to clarify further what @linl33 posted.

You can check out the documentation on how to write a query from the CSV [Using ODK-X XLSX Converter — ODK-X Docs](https://docs.odk-x.org/xlsx-converter-using/#using-queries)

Check out the query “countries.csv” and it’s callback function:

> \_.map(context, function(place){place.data\_value = place.country;  
> place.display = {title: {text:place.country} };  
> return place;  
> })

Specifically the part of the function that sets ‘place.display’ you will need to revise to include the information @linl33 talked about. Each row in the CSV is being referred to as an object called “place”.

So the each option’s **display** information is revised by the line  
place. **display** = `{title: {text: {default: "TEXT", es: "TEXT in ES"}}}` (you need to revise the “TEXT” part to be what you want).

instead of the example  
place. **display** = `{title: {text:place.country} };` where the country is the name of the column in the CSV

---

<div class="post-metadata">

**Author:** ![cmuchuchuti](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/cmuchuchuti/32/356_2.png) [@cmuchuchuti](https://forum.odk-x.org/u/cmuchuchuti)\
**Post date:** [March 10, 2021, 1:20pm UTC](https://forum.odk-x.org/t/multilingual-in-csv-file/1177/4 "2021-03-10T13:20:37Z")

</div>

Thank you @linl33 and @W_Brunette for your responses. I followed your instructions and have been successful in achieving this.
