Skip to content
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] Implementing a routing override blacklist #206

Open
Spomsoree opened this issue Apr 21, 2020 · 0 comments
Open

[RFC] Implementing a routing override blacklist #206

Spomsoree opened this issue Apr 21, 2020 · 0 comments

Comments

@Spomsoree
Copy link
Contributor

I love this library, but in some cases I don't want to override all routes in my project.
For example the search-route, which I have to call with /en/search.

Details

  • Translate Version: 4.4.2
  • Install type: Extension Repository
  • Bolt Version: 3.7
  • PHP version: 7.2

Description

I'd like to exclude some routes from the routing_override option.
In my case I'd like to exclude the search route, but I could come up with more use cases for this.

I normally just create a controller or an extension to create api routes without localization. But this is not the best way in my opinion. It would be much cleaner to register all routes in the routing.yml and exclude the ones that I don't want to be localized.

Maybe it's even possible to add a flag to the routes itself?

search:
    path: /search
    defaults:
        _controller: controller.frontend:search
    translate: false

I'm looking forward to your thought on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant