# Translations with Custom Function

**URL:** https://community.silverfin.com/t/translations-with-custom-function/1435
**Category:** Templates
**Created:** [March 22, 2019, 9:30am UTC](https://community.silverfin.com/t/translations-with-custom-function/1435 "2019-03-22T09:30:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Bart\_Verhaeghe](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)
#### Post date: [March 22, 2019, 9:30am UTC](https://community.silverfin.com/t/translations-with-custom-function/1435/1 "2019-03-22T09:30:30Z")

</div>

Hi there, I made the following custom function in a separate reconciliation template:

```
{% capture CUS_FUN_GeefJuisteBenamingen_Leidinggevenden_Vertaald %}
{% case company_form %}
{% when 'MAATSCHAP' or 'BVBA' or 'VOF' or 'COMMV' or 'COMMVA' %}
{% if company.custom.statuten.LedenBestuursorgaanHandelenAlleen == 'ja' %}
{% t="director_type" nl:"zaakvoerder|zaakvoerders|het college van zaakvoerders" fr:"gérant|gérants|le collège de gestion" en:"managing director|managing directors|the board of managing directors" dk:"Geschäftsführer|Geschäftsführer|Geschäftsführungskollegium" %}
{% elsif company.custom.statuten.LedenBestuursorgaanHandelenAlleen == 'neen' %}
{% t="director_type" nl:"zaakvoerder|zaakvoerders|de vergadering van zaakvoerders" fr:"gérant|gérants|l'assemblée des gérants" en:"managing director|managing directors|the assembly of managing directors" dk:"Geschäftsführer|Geschäftsführer|Führungskräftetreffen" %}
{% endif %}
{% when 'ESV' %}
{% t="director_type" nl:"zaakvoerder|zaakvoerders|het college van zaakvoerders" fr:"gérant|gérants|le collège de gestion" en:"managing director|managing directors|the board of managing directors" dk:"Geschäftsführer|Geschäftsführer|Geschäftsführungskollegium" %}
{% when 'CVOA' or 'CVBA' %}
{% t="director_type" nl:"bestuurder|bestuurders|de vergadering van bestuurders" fr:"administrateur|administrateurs|assemblée des administrateurs" en:"director|directors|the assembly of directors" dk:"Verwaltungsratsmitglied|Verwaltungsratsmitglieder|Sitzung der Verwalter" %}
{% when 'NV' or 'SE' or 'SCE' or 'VZW' or 'IVZW' %}
{% t="director_type" nl:"bestuurder|bestuurders|de raad van bestuur" fr:"administrateur|administrateurs|le conseil d'administration" en:"director|directors|the board of directors" dk:"Verwaltungsratsmitglied|Verwaltungsratsmitglieder|Verwaltungsrat" %}
{% when 'LV' %}
{% t="director_type" nl:"beherend vennoot|beherende vennoten|het college van beherend vennoten" fr:"gérant|gérants|le collège des associés gérants" en:"managing partner|managing partners|the board of managing partners" dk:"geschäftsführende Gesellschafter|geschäftsführende Gesellschafter|Vorstand der geschäftsführenden Gesellschafter" %}
{% endcase %}
{% capture str_leidinggevende_juisteterm_Vertaald %}{% t "director_type" %}{% endcapture %}
{{str_leidinggevende_juisteterm_Vertaald}}
{% endcapture %}
{% result 'CUS_FUN_GeefJuisteBenamingen_Leidinggevenden_Vertaald' CUS_FUN_GeefJuisteBenamingen_Leidinggevenden_Vertaald %}

```

In another template, I did the following:

```
{% assign str_AlleLeidinggevenden_JuisteBenaming_Vertaald = period.reconciliations.Cus_Fun.results.CUS_FUN_GeefJuisteBenamingen_Leidinggevenden_Vertaald | strip %}
{% assign arr_AlleLeidinggevenden_JuisteBenaming_Vertaald = str_AlleLeidinggevenden_JuisteBenaming_Vertaald | split:'|' %}

```

Now, this works fine in French, English and German (I used dk for this). Funny thing is that in Dutch (‘nl’), the results for ‘str\_AlleLeidinggevenden\_JuisteBenaming\_Vertaald’ is empty and for ‘arr\_AlleLeidinggevenden\_JuisteBenaming\_Vertaald’ is ‘director\_type’.

Any idea? Thanks!

---

<div class="post-metadata">

### Author: ![Michiel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michiel/32/2364_2.png) [@Michiel](https://community.silverfin.com/u/Michiel)
#### Post date: [March 22, 2019, 1:05pm UTC](https://community.silverfin.com/t/translations-with-custom-function/1435/2 "2019-03-22T13:05:30Z")

</div>

Hi Bart,

One crucial piece of code is missing here: how is the variable company\_form defined?

Regards,

Michiel
