Skip to content

[RFC] Implementing a routing override blacklist #206

@Spomsoree

Description

@Spomsoree

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions