JMSI18nRoutingBundle
JMSI18nRoutingBundle copied to clipboard
Locale redirect only works for Homepage
According to documentation (see http://jmsyst.com/bundles/JMSI18nRoutingBundle/master/configuration) the prefix
strategy should prefix all routes with locale. It does so, but only when generating/parsing routes.
There is also a fallback redirect for cases, when page without locale is accessed to redirect to same page with locale.
Unfortunately it has several issues:
- works only for homepage, e.g.
/
is redirected to/en/
, but/something
isn't redirected to/en/something
- the 302 redirect is made, but according to SEO it should be 301 redirect instead
File in question: https://github.com/schmittjoh/JMSI18nRoutingBundle/blob/master/EventListener/LocaleChoosingListener.php
Hi,
Same issue, Is there an option to achieve this example?
example: (default language is en)
/something -> redirect to /en/something /en/something --> /en/something /fr/something --> /fr/something
Since this morning, the fallback didn't work nether. I continue to investigate.
EDIT It seems to be the symfony 3.4.7 (and the buildin server), I keep looking
Fallback works on symfony 4.0.4 but not on 4.0.8. LocaleChoosingListener is not fired at all.