Symfony 5.1 route issue

I installed symfony 5.1.3 today and found the route configuration is something broken. I’m not sure if that is intended. But at least it’s different from symfony 4.4. I have the follow setting in 4.4 and it works fine.

      en-us: /
      others: /{_locale}/
   controller: AppControllerIndexController::homepage
      _locale: en-us|zh-cn|zh-hk

The above settings allow me to access and other, and successfully.

But now in symfony 5.1, the above setting does not work now. I believe the _locale with special meaning to the system maybe the root cause. Can anyone give me a help?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *