How to set the locale with symfony 3.4
问题 How can I change the locale using symfony 3.4 (php)? I have the locale saved for each user in my database. Now on this page they explain that you should create an event listener to set the locale. But they only provide a method - in which class do I put this method and how do I wire it up using my services.yml? And if I'm in the service - how can I access my user object to actually get the locale I want to set? 回答1: Here is an example provided by the docs on how to create an kernel request