我想做一个链接将在布局中改变语言。所以它应该适用于很多路线。symfony链接改变语言,并留在页面上
例如 我是页/ EN/Mymodule中
上的链接应该指向 /德/ Mymodule中 /FR/Mymodule中
我发现这里的解决方案是:http:/ /oldforum.symfony-project.org/index.php/m/70452/
<?php echo link_to(
'Germany',
'@default?' . http_build_query(array(
'sf_culture' => 'de',
'module' => $sf_request->getParameter('module'),
'action' => $sf_request->getParameter('action'))
), null, '&')) ?>
问题是,我需要一个默认路由,而我不希望拥有它。
有什么解决方案,我需要什么?
为什么不会要使用默认路由? – Pabloks 2011-03-17 18:13:42