-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[RFC] disable langs in Internationalized routing and redirecting #36266
Comments
Sounds good, though I'm not an expert in i18n or SEO so can't comment. One tiny bit of feedback, though - I think you want |
Thanks. I changed it. |
How about using And is |
The default http_code is 404. |
Finally works with any of this three methods:
What else? :-) |
I'm not sure we should add this to Symfony core.
|
@javiereguiluz I'm not sure I understand your "1.": i18n routes don't have to use prefixes, that's their point. Forcing a prefix-based layout just to be able to disable one locale doesn't seam to address the issue to me. @hectorprats I'm not sure we need any new configuration: we already have an Implementation wise, this could be implemented as a routing loader, coulnd't it? (Note that these are just my first thoughts to contribute to the discussion, I might have missed many things :) ) |
@javiereguiluz Thanks for the input.
@nicolas-grekas I think you're right. I can improve it a lot in the use of variables. thanks to both of you. I'm going to let the day pass (or 2 or 3) to finish talking about this and see the final way to tackle it. |
I reviewed the code a bit. Im 👎 If you want to temporary disable a language I suggest to write a RequestListener. |
Let's close then. |
Description
By creating a website, I have discovered that I need to temporarily hide a language.
But to delete all the routes in the controllers (annotations) and to put them back in the future seems absurd to me.
I am designing a new feature to be able to close a language completely (http code 404) or that you can make a temporary redirection to another language.
It can be very useful for SEO.
For this reason, I beg you to contribute ideas and suggestions to improve it. I would like to finish it as soon as possible.
Example
With this yaml, you can redirect 307 from the Portuguese version to the English version and 404 to the Spanish version.
The text was updated successfully, but these errors were encountered: