# Translate options of checkbox

**URL:** <https://community.silverfin.com/t/translate-options-of-checkbox/1383>\
**Category:** Templates\
**Tags:** translations, filter\_array\
**Created:** [February 11, 2019, 1:25pm UTC](https://community.silverfin.com/t/translate-options-of-checkbox/1383 "2019-02-11T13:25:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cedric.devos](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@cedric.devos](https://community.silverfin.com/u/cedric.devos)\
**Post date:** [February 11, 2019, 1:25pm UTC](https://community.silverfin.com/t/translate-options-of-checkbox/1383/1 "2019-02-11T13:25:44Z")

</div>

Hi there,

In this template (see below) I ask the user to answer with “ja” or “neen”.  
Is it possible to translate the options “ja|neen” in a checkbox to French and English?

```auto
| **{% t "Status uitkering als dividend/tantième" %}**
| {% t "Wenst u gebruik te maken van de VVPRbis regeling voor uitkering als dividend en zijn alle voorwaarden voldaan?" %} | {% input custom.checkbox.vvpr as:select options:"ja|neen" %} {% if custom.checkbox.vvpr == "ja" %}
| {% t "Op welke datum gebeurde deze inbreng in geld? (vanaf 01/07/2013)" %} | {% input custom.vvpr.datum as:date %}

```

Kind regards,  
Cedric

---

<div class="post-metadata">

**Author:** ![cedric.devos](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@cedric.devos](https://community.silverfin.com/u/cedric.devos)\
**Post date:** [February 11, 2019, 2:24pm UTC](https://community.silverfin.com/t/translate-options-of-checkbox/1383/2 "2019-02-11T14:24:27Z")

</div>

Found the solution in this post: [CASE: create dropdown with select options](https://community.silverfin.com/t/case-create-dropdown-with-select-options/893)

---

<div class="post-metadata">

**Author:** ![cedric.devos](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@cedric.devos](https://community.silverfin.com/u/cedric.devos)\
**Post date:** [February 11, 2019, 3:38pm UTC](https://community.silverfin.com/t/translate-options-of-checkbox/1383/3 "2019-02-11T15:38:17Z")

</div>

How do you translate when working with arrays?  
I have this piece of code (see below) and want to translate it into French and English.

```auto
{% assign array_checks = "Staat de onderneming hogere financiële kosten toe dan normaal?; Is de (eventuele) financiële afhankelijkheid van een andere vennootschap recentelijk toegenomen?;Waren er recent betalingsachterstanden m.b.t. achterstallige RSZ?;Waren er recent betalingsachterstanden m.b.t. lonen personeel?;Waren er recent betalingsachterstanden m.b.t. verschuldigde bedrijfsvoorheffing?" | split:";" %}

```

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![borjaGonzalez](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/borjagonzalez/32/825_2.png) [@borjaGonzalez](https://community.silverfin.com/u/borjaGonzalez)\
**Post date:** [February 11, 2019, 4:21pm UTC](https://community.silverfin.com/t/translate-options-of-checkbox/1383/4 "2019-02-11T16:21:16Z")

</div>

Hi Cedric,

You can define the translations on top for each element and then capture the array like this:

```auto
{% t= "english" nl:"dutch" fr:"french" %}

{% capture array %}{% t "english" %};array_string1;array_string2{% endcapture %}

{% assign array = array | split:';' %}

```

Hope that helps.

Best,  
Borja

---

<div class="post-metadata">

**Author:** ![cedric.devos](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@cedric.devos](https://community.silverfin.com/u/cedric.devos)\
**Post date:** [February 12, 2019, 12:34pm UTC](https://community.silverfin.com/t/translate-options-of-checkbox/1383/5 "2019-02-12T12:34:38Z")

</div>

Hi Borja,

I don’t see how to implement this in my code. Can you help me a bit further?

The translation in French for the first question in Dutch (Staat de onderneming hogere financiële kosten toe dan normaal?) is _‘L’entreprise fait-elle face à des coûts financiers plus importants que la normale?’_.

Don’t I have to make a link with array\_checks?

Kind regards,  
Cedric

---

<div class="post-metadata">

**Author:** ![borjaGonzalez](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/borjagonzalez/32/825_2.png) [@borjaGonzalez](https://community.silverfin.com/u/borjaGonzalez)\
**Post date:** [February 12, 2019, 1:38pm UTC](https://community.silverfin.com/t/translate-options-of-checkbox/1383/6 "2019-02-12T13:38:55Z")

</div>

Hi Cedric,

You should be able to achieve the translation like this:

```auto
{% t= "Staat de onderneming hogere financiële kosten toe dan normaal?" fr:"L’entreprise fait-elle face à des coûts financiers plus importants que la normale?" %}

{% capture array_checks %}{% t "Staat de onderneming hogere financiële kosten toe dan normaal?" %};array_string1;array_string2{% endcapture %}

{% assign array_checks = array_checks | split:';' %}

{% for item in array_checks %}
{{ item }}
{% endfor %}

```

I added a loop at the bottom to retrieve the array so that you can check that the string changes when you change the language.

Let me know if that is clear.

Best,  
Borja

---

<div class="post-metadata">

**Author:** ![cedric.devos](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@cedric.devos](https://community.silverfin.com/u/cedric.devos)\
**Post date:** [February 14, 2019, 4:12pm UTC](https://community.silverfin.com/t/translate-options-of-checkbox/1383/7 "2019-02-14T16:12:35Z")

</div>

Thanks a lot!
