10
我想在Symfony2中翻譯我的URL路由。Symfony2翻譯URL和路由
我已經管理tld更改我的應用程序的語言。
例:
- domain.com =>本地= 「EN_US」
- domain.fr =>本地= 「fr_FR目錄」
- domain.it =>本地= 「it_IT」
的翻譯工作模板靜態字與 {% trans %}Hello %name%{% endtrans %}
http://symfony.com/doc/2.0/book/translation.html#translations-in-templates
但我試圖翻譯路由。
例:
- domain.com/user => FrontBundle:默認:用戶
- domain.fr/utilisateur => FrontBundle:默認:用戶
- ...
所有網址都採用相同的動作
我沒有找到與Symfony2一起使用的好方法
個PS:我看到這個帖子Zend translate URL and language switcher這是完全一樣的問題,但與Zend
這包似乎爲我量身定做的,但我找不到文檔來查看哪些區域設置用於翻譯。 我使用Symfony 2.1.0-DEV,並且此類中沒有語言環境。該區域位於請求中。但捆綁沒有看到變化,並使用翻譯fallback – user1014102 2012-02-01 08:40:16
終於我用https://github.com/schmittjoh/JMSI18nRoutingBundle – user1014102 2012-03-30 09:13:07
@ user1014102:謝謝!正是我正在尋找... – 2013-04-10 06:25:43