title: Adding attributes to the path request with twig in symfony2
body: <p>I've been googleing this question but I can't find anyone with my same problem... And I don't think I'm the only one here >.&lt;</p>
  
  <p>Let's see, I'm using translations in symfony2. I NEED to use twig for this...
  The thing is that I need 3 links so people can change the site's language. The link has to redirect to the same page the user is, but changing the '_locale'.</p>
  
  <p>I first thought in something like this:</p>
  
  <pre><code>// in routing.yml
  bundleStuff_someUrl:
      pattern:  /{_locale}/aloha
      defaults: { _controller: bundleStuff:Aloha:foo }
  
  bundleStuff_fooUrl:
      pattern:  /{_locale}/foo/{fooParam}
      defaults: { _controller: bundleStuff:Foo:foo }
  
  // in view.html.twig
  &lt;a href="{{ path((app.request.get('_route'), { '_locale': 'l1' }) }}"&gt;lang1&lt;/a&gt;
  &lt;a href="{{ path((app.request.get('_route'), { '_locale': 'l2' }) }}"&gt;lang2&lt;/a&gt;
  &lt;a href="{{ path((app.request.get('_route'), { '_locale': 'l3' }) }}"&gt;lang3&lt;/a&gt;
  </code></pre>
  
  <p>The problem becomes when (in this case) the _route is fooUrl... Is there a way to append every attribute I have in the current view to the path I'm looking for? 
  In other words referring to this example: is there a way so twig knows it has to add the 'fooParam' to the path if the current view is 'fooUrl'?</p>
  
  <p>Thank's in advance!
  Hope this post is useful! :D</p>