What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Spryker generally provides multilang via different domains, in one of our projects we needed multi l
Spryker generally provides multilang via different domains, in one of our projects we needed multi lang via sub-directories so we did a small "hack" in the YvesBootstrap. this is also a blueprint how to maybe customize URLs via config rather than overriding provider classes https://gist.github.com/lsmith77/cdb6c0d5cf686c7792f8c9aa34f5a673
Comments
-
note we also separated our projects into a public and private catalog on different domains, so this solution also includes a way to hide routes depending on the domain
0 -
in one of our projects we needed multi lang via sub-directories
this is really specific case (not common)
0 -
Christian von Schassen Director Partner Succcess Management Sprykee Posts: 33 π§π»βπ - Cadet
Thanks for sharing , Lukas! What would the URLs look like in that case? (Feel free to anonymize)
0 -
f.e foo.com/en/about vs. foo.com/de/ueber-uns
0 -
it also handles redirecting from the top level
0 -
ie. if you forget to add a language
0 -
Christian von Schassen Director Partner Succcess Management Sprykee Posts: 33 π§π»βπ - Cadet
Nice one. What would it do in case someone mixes Lang and term, i.e. foo.com/de/about ?
0 -
@UJLM6CAFR 404 I would suggest
@UKAFY33RP Spryker by default uses a language path part in the URL. It is fairly easy to create multiple routes to the same controller actions using the existing controller provider mechanism. This way you can already have multiple (language specific) URLs pointing to the same controller action.0 -
@UJLM6CAFR donβt remember .. I might have added a redirect to the correct language
0 -
but this is of course a project specific business requirement
0 -
@UK5EG6PBM I am of course a Symfony framework developer and would wish Spryker would be build on Symfony full stack
0 -
one of the biggest short comings of spryker that too much config is done via code
0 -
specifically routing, services and config itself
0 -
with this solution I now have a central location where any human can have an overview of all the routes
0 -
in a compact format
0 -
without having to override code which is impossible to quickly read to get an overview
0 -
this on top of the fact that spryker offers no effective way to debug routes is a huge step forward imho
0 -
one of the biggest short comings of spryker that too much config is done via code
That's a big advantage that Spryker has imho. No magic, it's all right there in code.
0 -
with this solution I now have a central location where any human can have an overview of all the routes
Understandable from a project perspective. I guess for Spryker this is a no-go since it creates unnecessary coupling and I would agree on that
0 -
imho dedicated DSLβs for services, config and routing increase clarity by a billion times and the out comes are predictable enough in most cases and I appreciate the βmagicβ a lot for services. but yeah that is a philosophical issue I have with Spryker and indeed a lot of people prefer it the way it is. some of my problems with the βcode for configβ approach is that then I would wish all the more for tools that could export this information in a compact format
0 -
but with the above solution stakeholders can now actually see (and a technical PO could even adjust) the routing
0 -
and to me routing isnβt something developers should need to care about all that much
0 -
Spryker by default uses a language path part in the URL.
@UK5EG6PBM we are working on some cool updates here. Lang will become optional and detached from URL definition in a new Router.
@UKAFY33RP as we would like to release own Router leveraging Symfony Chain Router power, maybe you could point out some interesting requirements we could consider to add?
0 -
Thanks for the update @UJ8Q2T36E
0 -
@UJ8Q2T36E approaching it via a custom router certainly makes sense .. especially in order to also be able to deal with this for categories
0 -
Right! If you have specific use cases / requirements we could validate them against the implementation. π
0 -
@UJ8Q2T36E you can check with @UK5EG6PBM on that .. the project you know they took over also needs the ability to handle categories via sub-directories .. the hack I did to make this possible is indeed quite ugly and should be removed (if it hasn't been removed already)
0 -
Ok, thanks!
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random