Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  [Routing] Document the effect of setting `locale` on a route with locale prefixes
  • Loading branch information
javiereguiluz committed Jun 21, 2024
2 parents ab883ae + 5cea89e commit 6d7ada0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2072,6 +2072,16 @@ with a locale. This can be done by defining a different prefix for each locale
;
};
.. note::

If a route being imported includes the special :ref:`_locale <routing-locale-parameter>`
parameter in its own definition, Symfony will only import it for that locale
and not for the other configured locale prefixes.

E.g. if a route contains ``locale: 'en'`` in its definition and it's being
imported with ``en`` (prefix: empty) and ``nl`` (prefix: ``/nl``) locales,
that route will be available only in ``en`` locale and not in ``nl``.

Another common requirement is to host the website on a different domain
according to the locale. This can be done by defining a different host for each
locale.
Expand Down

0 comments on commit 6d7ada0

Please sign in to comment.