Skip to content

Instantly share code, notes, and snippets.

@rkempter
Created March 19, 2013 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkempter/5194885 to your computer and use it in GitHub Desktop.
Save rkempter/5194885 to your computer and use it in GitHub Desktop.
Symfony 2 change language of current route
<ul class="lang-menu">
<li><a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'ca'})) }}">Català</a></li>
<li><a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'en'}))}}">English</a></li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment