[symfony-users] Re: [Symfony2] Best way for using a base locale in URL (no I18N)

2011-05-31 Thread Mauricio Morales
Thanks Crhistophe, So I do this: homepage: pattern: /{_locale}/ defaults: { _controller: WebsiteBundle:Home:index } requirements: _locale: en|es But then I have to do this: a href={{ path('homepage', {'_locale': app.request.attributes.get('_locale')}) }}/a What I'd

Re: [symfony-users] Re: [Symfony2] Best way for using a base locale in URL (no I18N)

2011-05-31 Thread David Buchmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi mauricio, the _locale is automatically taken from the session, no need to configure anything there. you can just to path('homepage') if you want the path to the homepage in the current session language. cheers,david Am 31.05.2011 14:48, schrieb