title: Convert variable to string in Twig
body: <p>I'm having trouble to translate a string in Twig. I'm building a theme for a multilingual webshop. </p>
  
  <p>A user can create a USP (Unique Selling Point). Problem is that it won't translate when you have a different language. </p>
  
  <p>So the usp is called like this in the template <code>{{ theme.usp }}</code>
  The outcome of that is for example "Free shipping". </p>
  
  <p>To translate a string in the system you have to use a <code>{{ 'Free shipping' | t }}</code> filter. </p>
  
  <p>Is there any way to get <code>{{ theme.usp }}</code> translated. I thought this would be useful but I don't know how to incorporate this. <a href="https://stackoverflow.com/questions/7704253/how-to-concatenate-strings-in-twig">How to concatenate strings in twig</a></p>
  
  <p>What I did was:</p>
  
  <pre><code>{% set usp = {{ theme.usp }} %}
  {{ usp | t }}
  </code></pre>
  
  <p>Doing this gives me an error since <code>{{ theme.usp }}</code> has to be between <code>''</code>. Doing that doesn't gives me <code>'Free shipping'</code> as outcome but <code>'theme.usp'</code>.</p>
  
  <p>Anyone a suggestion?</p>