【发布时间】:2017-03-28 08:18:51
【问题描述】:
我的项目在 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>
你有什么想法吗?
提前谢谢你。
【问题讨论】:
标签: php symfony routing translation symfony-3.2