title: In Twig, how do I use a dynamic key when translating
body: <p>In my translation yml file I have these translations setup</p>
  
  <pre><code>pages:
      training_missions:
          ...
          application_name:
              admin: "Admin Website"
              mobile: "Mobile App"
              kiosk: "Kiosk"
  </code></pre>
  
  <p>In my twig file, I need to set the application_name dynamically, but I can't get it to work properly.</p>
  
  <p>This will translate fine, it gives me "Mobile App"</p>
  
  <pre><code>{{ 'pages.training_missions.application_name.mobile' | trans()}}
  </code></pre>
  
  <p>But this doesn't work, it gives me "pages.training_missions.application_name.mobile"</p>
  
  <pre><code>{{ 'pages.training_missions.application_name.'~trainingMission.application | trans() }}
  </code></pre>
  
  <p>edit:
  The variable trainingMission.application contains one of the 3 strings I put in the yaml file : admin, mobile, kiosk</p>
  
  <p>edit 2:
  The solution is to wrap the string in parenthesis as per @Matteo 'Ingannatore' G. comment</p>