我的项目在 Symfony 3.2.6 中,我尝试使用 BeSimpleI18nRoutingBundle 在生产模式下生成 i18n 路由。
在开发模式下,没关系。
但是在生产模式下,生成的路由总是在相同的语言环境中(当前)。
(我已经清除了缓存)
我使用这些链接进行切换:
<a href="{{ path(app.request.attributes.get('_route'), {'locale': 'fr'}) }}">fr</a>
<a href="{{ path(app.request.attributes.get('_route'), {'locale': 'en'}) }}">en</a>
你有什么主意吗 ?
先感谢您。