symfony - Symfony2 Set _locale in home page base on browser's configuration -
my local works everywhere on website cant tell application set proper local on root of application.
for exemple :
if website http://mycompany.com want that, when enter address application guess local , set @ end of url http://mycompany.com/en if local exist on application. here en
or fr
, if not default en
for when go home page english version browser set in french
routing.yml :
_welcome: pattern: /{_locale} defaults: { _controller: mybundle:default:landing, _locale: en } requirements: _locale: en|fr
see question asked few days ago , take @ first method in language listener. need. , take care of right settings in config.yml
Comments
Post a Comment