title: Translate locale symfony 4 twig template
body: <p>I have a question about the translation of a twig template.</p>
  
  <p>This is an actual way to translate.</p>
  
  <pre><code>{% trans into 'en_EN' %}Hello{% endtrans %}!,
  </code></pre>
  
  <p>Can I load directly the '' value from a database like this? (this returns an error).</p>
  
  <pre><code>{% trans into {{ app.user.lang }} %}Hello{% endtrans %}!,
  </code></pre>
  
  <p>or shall I use a controller to do it?</p>
  
  <p>I'm now using the following function to translate:</p>
  
  <pre><code>{% with %}
  {% set lang = app.user.lang %}
  &lt;button class="btn btn-outline-primary" type="button" data-toggle="dropdown"&gt;{% trans into lang %}Hello{% endtrans %}!, {{ app.user.username }}&lt;i class="material-icons"&gt;arrow_drop_down&lt;/i&gt;&lt;/button&gt;
  {% endwith %}
  </code></pre>
  
  <p>But I'm not sure if is a good practice or not.</p>