-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Routing] Add locale fallback to internationalized routes #10108
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
[Routing] Add locale fallback to internationalized routes #10108
Conversation
32051bd
to
c15df9d
Compare
routing.rst
Outdated
@@ -210,6 +210,17 @@ should be used during the request. Defining routes this way also eliminated the | |||
need for duplicate registration of routes which minimizes the risk for any bugs | |||
caused by definition inconsistency. | |||
|
|||
.. tip:: | |||
|
|||
If you use full locales (language + territory) in your application (e.g. `fr_FR`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/territory/culture/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this, I took it from Wikipedia and the info seems to come from the ISO standard (https://en.wikipedia.org/wiki/Locale_(computer_software)).
routing.rst
Outdated
for several full locales that share the same language (e.g. `fr_FR` and `fr_BE`). | ||
|
||
.. versionadded:: 4.2 | ||
The feature to fall back on the language part only was introduced in Symfony 4.2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fallback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "fallback" is the noun, and "fall back" the verb (https://english.stackexchange.com/questions/90549/difference-between-fallback-and-fall-back)
upstream merged |
1 similar comment
upstream merged |
…nationalized routes (fancyweb) This PR was merged into the 4.2-dev branch. Discussion ---------- [Routing] Add fallback to cultureless locale for internationalized routes | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#27938 | License | MIT | Doc PR | symfony/symfony-docs#10108 Please check the related issue for the context. TODO : - [x] Update CHANGELOG - [x] Update documentation Commits ------- fd2e3c36fb [Routing] Add fallback to cultureless locale for internationalized routes
…nationalized routes (fancyweb) This PR was merged into the 4.2-dev branch. Discussion ---------- [Routing] Add fallback to cultureless locale for internationalized routes | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #27938 | License | MIT | Doc PR | symfony/symfony-docs#10108 Please check the related issue for the context. TODO : - [x] Update CHANGELOG - [x] Update documentation Commits ------- fd2e3c3 [Routing] Add fallback to cultureless locale for internationalized routes
@fancyweb this is a truly convenient feature! Love it. Thanks for contributing it. |
…s (Thomas Calvet, javiereguiluz) This PR was merged into the master branch. Discussion ---------- [Routing] Add locale fallback to internationalized routes Related PR : symfony/symfony#27957 Commits ------- 02cc739 Minor reword c15df9d [Routing] Add locale fallback to internationalized routes
Related PR : symfony/symfony#27957