Skip to content

No automatic redirection #952

@strottier93

Description

@strottier93

Describe the bug
When the user change manually the locale in browser, he have an error 404.

To Reproduce
/fr/categories and change manually in the browser address bar to /en/categories.

Same with the slug eg:
/fr/categories put /en/categories -> 404

/fr/categorie/connecteurs put /en/categorie/connecteurs -> 404

Expected behavior
Did this package have a feature middleware for automatic redirection translate?

I would to automatic redirect on translated good route eg:

/fr/categories put /en/categories -> redirect to /en/category

/fr/categorie/connecteurs put /en/categories/connecteurs -> redirect to /en/category/connectors

More info:

  • Laravel 12
  • Latest Localization package
  • Use all middleware
  • Use Spatie Translate

Additional context

Is it native on this package or I need to build my own middleware with my own logic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions