-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Fetching my endpoints from client component without locale path #553
Labels
Comments
I think you need to add export default createMiddleware({
locales,
defaultLocale,
localePrefix: 'as-needed'
}); |
Oh, I actually managed to fetch my endpoints without locale.
I had to do this:
And big thanks for it, this works:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I have one problem and one question.
My default locale doesn't work. Every time I call URL without language it redirects me to URL with /de/ path in it. My navigation.ts:
This request this URL -> http://localhost:3000/ua/api/whisper
I want http://localhost:3000/api/whisper
Thank you
Mandatory reproduction URL (CodeSandbox or GitHub repository)
https://codesandbox.io/p/sandbox/boring-knuth-crls32
Reproduction description
/app/[locale]/layout.tsx
middleware.ts
navigation.ts
Expected behaviour
When I call website without locale (/en/ or /de/ just localhost:3000) I expect my URL without locale but with the default language.
The text was updated successfully, but these errors were encountered: