# CASE: variables in translation-tags

**URL:** <https://community.silverfin.com/t/case-variables-in-translation-tags/891>\
**Category:** Cases\
**Tags:** variables, translations, case\
**Created:** [May 17, 2018, 11:13am UTC](https://community.silverfin.com/t/case-variables-in-translation-tags/891 "2018-05-17T11:13:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [May 17, 2018, 11:13am UTC](https://community.silverfin.com/t/case-variables-in-translation-tags/891/1 "2018-05-17T11:13:38Z")

</div>

You could have a case where you’d want to use different languages, and in your sentence you use some variables.

For instance:

```auto

{% assign name = "Michael Jordan" %}
{% assign start_mandat = company.custom.mandat.start %}

The mandat of {{ name }} has started on {{ start_mandat }}.  

```

which gives this as output:  
 ![00](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/1X/53663193b6beb155520a736e82a6b7218e7dfafa.png)

If you want to translate this to other languages, you’ll need to use the translation-tag, like this:

```auto

{% t= "The mandat of" nl:"Het mandaat van" %}
{% t= "has started on" nl:"is begonnen op" %}

{% assign name = "Michael Jordan" %}
{% assign start_mandat = 'today' | date: '%d/%m/%y' %}

{% t "The mandat of" %} {{ name }} {% t "has started on" %} {{ start_mandat }}. 

```

So we take the words or sentences without the variable in a translation tag, which can become impractical.

💡

From now on however, you can take variables within a translation-tag, like this:

```auto

{% t= "The mandat of {{ name }} has started on {{ start_mandat }}" nl:"Het mandaat van {{ name }} is begonnen op {{ start_mandat }}" %}

{% t "The mandat of {{ name }} has started on {{ start_mandat }}" name:"Michael Jordan" start_mandat:company.custom.mandat.start %}  

```

Less code now, but you’ll have to define your variables within the translation-tag as well.
