Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a help note about translating routes #8123

Merged
merged 1 commit into from
Jul 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,15 @@ route::
// or, in Twig
// {{ path('blog_show', {'slug': 'slug-value'}) }}

Translating Routes
------------------

Symfony doesn't support defining routes with different contents depending on the
user language. In those cases, you can define multiple routes per controller,
one for each supported language; or use any of the bundles created by the
community to implement this feature, such as `JMSI18nRoutingBundle`_ and
`BeSimpleI18nRoutingBundle`_.

Summary
-------

Expand Down Expand Up @@ -743,3 +752,6 @@ Learn more about Routing
:glob:

routing/*

.. _`JMSI18nRoutingBundle`: https://github.com/schmittjoh/JMSI18nRoutingBundle
.. _`BeSimpleI18nRoutingBundle`: https://github.com/BeSimple/BeSimpleI18nRoutingBundle