i18n: fallbacks strip search params #12546
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: i18n
Related to internalization (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The i18n module allows you to configure fallbacks for locales that dont have explicit page files for them. The injected middleware will rewrite or redirect the request to the page/url with the configured fallback locale. The code to do so does not pass forward any search params in the url. This blocked an intended use case for us, and I cannot think of a reason why it should not be the standard behavior. The existing relevant code is
In the stackblitz you can use ?name=whatever and see the index page change, then see the localized version falling back to 'en' at /es, then see the index render with a rewrite without the search params at /es?name=whatever
What's the expected result?
It should pass forward the search params in the rewrite/redirect. thus:
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-gafyfx
Participation
The text was updated successfully, but these errors were encountered: