I'm trying to find a way to setup Symfony2 with language support but where it defaults to a default language if a language not entered.
So basically I want to allow these URLs for the 'page' page:
example.com/page
example.com/fr/page
example.com/de/page
etc...
I can easily do it if you always specify a language (e.g. example.com/en/page) but I don't want that. I want my links to be like this for English:
example.com
example.com/page
example.com/about
...and IF the user changes language to then append that to the URL:
example.com/fr
example.com/fr/page
example.com/fr/about
I currently use this but I have to specify a language on every request:
the_site:
resource: "@MyBundle/Resources/config/routing.yml"
prefix: /{_locale}
requirements:
_locale: en|fr|es|de
I don't think this is possible??