The translation tag is used to translate the content of the template.

Adding translation tag to the template allows you to have one template in different languages.

Set translations

To make sure that the content of the template is translated in different languages, you need to set translation by:

  1. indicating the language to which you would like to translate your text; and
  2. adding text in that particular language.

In the example below, we used translation tag to make sure that the word expense is translated to three different languages, i.e. Dutch, French and English.

{% t= "expense" nl:"kost" fr:"les frais" en:"expense" %}

Get translations


The translation depends on the language chosen in the Silverfin environment.
Let's assume that the language is french.

To execute the translation, the word/content should be placed in brackets with the letter t in front of it.

{% t "expense" %}
Les frais


You probably want most of the texts, placeholders, etc. to be translated when switching your language in Silverfin. Consider the following code:

{% t="car" nl:"wagen" fr:"voiture" %}
{% t "car" %}

In this case, the English translation is actually not specified, only the Dutch and French translation are. However, “car" (the translation tag name) acts here as a default translation for missing languages.

You can replace this behaviour by adding a default translation in your translation tag using the keyword default:

{% t="warningtext_t" dk:"advarsel" fr:"advarsel" nl:"warning" default:"warning" %}


In some cases you might want that certain parts of the translation depend on a condition in the template (e.g. the article number of the corporate law).
You can create variables inside the translations. To accomplish this, when you are defining the translation tag, you have to establish this variables using this sintax: {{ variable }}.
And then, when the translations is been called in the code, you need to refer that variable to the one that it is going to be displayed in that place.

{% if modal_aa >= 2019 %}
    {% t= "company_type" nl:"VENNOOTSCHAP" fr:"LA SOCIÉTÉ" en:"COMPANY" %}
    {% capture company_var %}{% t "company_type" %}{% endcapture %}
{% else %}
    {% t= "company_type" nl:"ONDERNEMING" fr:"L'ENTREPRISE" en:"ENTERPRISE" %}
    {% capture company_var %}{% t "company_type" %}{% endcapture %}
{% endif %}

{% t= "message" nl:"Nummers van de paritaire comites die voor de {{ type_var }} bevoegd zijn" fr:"Numéros des commissions paritaires dont dépend {{ type_var }}" en:"Number of joint industrial committee responsible for the {{ type_var }}" %}

{% t "message" | type_var:company_var %}