Replies: 1 comment 2 replies
-
Thank you for the feedback @apfelbox! 🙌
I guess it depends a bit on what you consider "valid" here. Valid in terms of we can assume a locale to render for the request—for sure—but it might not be the best-matching one, or yet one the user understands at all. It seems to me like at least being able to support both use cases is reasonable.
I would probably have to check in detail. Do you have details for specific cases where you found issues? The middleware runs independently of how you've defined pages in There's quite an extensive test suite at |
Beta Was this translation helpful? Give feedback.
-
Hi,
using
localeDetection: true
in combination withlocalePrefix: "as-needed"
should preferably be disallowed.First: it isn't really useful, as on
/
you probably don't want locale detection, as there already is a valid locale at this address. And if the matched locale of your browser doesn't match the default locale, this page would not be accessible (as you will always be redirected away).But also, I have a URL structure like this:
with
localeDetection
enabled, you will get weird issues, aslocale
will just be the first URL segment, no matter whether this is an actual URL.With it disabled, the
[locale]
param will be injected correctly.I don't really know the internals, but maybe this is due to the fact, that we basically only have fully dynamic (
[[...url]]
) routes?Thanks for your great library and all the awesome work! 🙌
Beta Was this translation helpful? Give feedback.
All reactions