English 中文(简体)
• 如何将“地方”列入“国名2”中的每一部分?
原标题:How to set {locale} in every URL in Symfony 2?

你如何这样做? 但是,如果可能,避免使用特定语言

每艘船长都要写。

例如:我希望我的网站对每艘军阀/和/或每艘军舰作出反应。 前者为english,后者为french。

最佳回答

https://github.com/schmittjoh/JMSI18nRoutingBundle。 JMSI18nRoutingBundle,在无需重复任何路由定义的情况下,为路线增加国际化支持。

这一障碍与三个共同设想方案混在一起,用于翻译路线。 页: 1 预设除违约地方以外的“地方”所有路线

问题回答

您的路线。 y,你可能拥有类似的东西(如果你用yam子来进行路线安排的话):

AcmeTestBundle:
  resource: "@AcmeTestBundle/Resources/config/routing.yml"
  prefix: /

您是否尝试在预设部分中增加{地方}?





相关问题
How does gettext handle dynamic content?

In php (or maybe gettext in general), what does gettext do when it sees a variable to dynamic content? I have 2 cases in mind. 1) Let s say I have <?=$user1?> poked John <?=$user2?>. ...

Explain the Need for Mutexes in Locales, Please

Reading the question Why doesn’t C++ STL support atoi(const string& ) like functions?, I encountered a comment which warned that GCC (at least) has a bug that can slow down multi-threaded ...

How does Vistalizer work

How does Vistalizer manage to override the language limit in Windows Vista Home edition. Which api s does it use to allow installation of Multiple language packages.

Localized exceptions (within a Struts2 app)

I am developing a Struts 2 application with support for multiple languages. If one of the domain objects needs to throw an exception, how can it do so in such a way that the error message is no ...

Rails Globalize plugin help

Has anyone gotten the Globalize plugin to work Rails 2.3.2 or later? If so, could you direct me to some useful info?

热门标签