-
Notifications
You must be signed in to change notification settings - Fork 37
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] Hide slug for default locale (in routes/links) #40
Comments
If we think about implementing more URL styles in the future, we could also use one setting to define the URL type, like |
@madc: My original idea was that the default "automatic" routing would be for users who just wanted to get started without all the configuring, so I made it disableable so that one could do hostname based or other types of routing in the routing.yml file, but if we can implement a The So, I'm all for this if we can get it to work well :) One thing to take into consideration is that everything we do in many parts basically has to be implemented in both legacy and proper storage since legacy is used on the frontend and proper is used on the backend. |
I'm totally with you on that. The default configuration should reflect the usual use case and work right out of the box. Thing is, I'll have to take some time soon to implement this and I'm sure, its interesting for other users too. I'd suggest to implement the |
Yeah, If you have any questions/notes/criticism about/of my code please just throw them out there and I'll answer ASAP :) |
Believe me, I'm not the guy holding back on criticism.. .. as for questions, they will come for sure. |
Just a quick heads up: I'm currently working on this feature here: madc/bolt-translate |
I think I have this working just by setting my own route. But it's only a very simple single-page site with only one contenttype. /app/config/routing.yml
All options in translate.animal.yml are set to false. |
While this is possible with some routing hacks like @benwallis mentioned, I don't think we can do it on a larger scale as long as we do prefix routing. Basically we can't check for the locale when building the routing, so we can't exclude the locale then (sorta a catch-22 problem) and we can't have optional parameters before required ones so we can't make the locale optional since the rest of the route params need to be required. If we did suffix routing like /page/about-us/en instead we could do it, but that looks really ugly and can be done in ones own routing if one prefers. Closing for now, if we find a way to do it we can reopen. |
Personally, I'm a huge fan of simple URLs. Thats why i propose, that we introduce an option to hide the slug of the default locale. That means, that instead of
mysite.com/de
andmysite.com/en
, we would havemysite.com
andmysite.com/en
, if german is the default language.After giving this just a quick thought, I can come up with two ways to solve this (from user perspective):
hide_default_slug
: [true/false])locales
configWhat do you thinkt, @SahAssar?
The text was updated successfully, but these errors were encountered: