Don’t use a locale prefix for the default locale [domain]/test not working #1777
Replies: 4 comments
-
there might be something wrong, as middleware and actual ![]() |
Beta Was this translation helpful? Give feedback.
-
@jmisilo getRequestConfig is default config. not change import {getRequestConfig} from 'next-intl/server';
import {routing} from './routing';
export default getRequestConfig(async ({requestLocale}) => {
// This typically corresponds to the `[locale]` segment
let locale = await requestLocale;
// Ensure that a valid locale is used
// eslint-disable-next-line
if (!locale || !routing.locales.includes(locale as any)) {
locale = routing.defaultLocale;
}
return {
locale,
messages: (await import(`@/messages/${locale}.json`)).default
};
}); |
Beta Was this translation helpful? Give feedback.
-
no, it was in my project, during development. unrelated |
Beta Was this translation helpful? Give feedback.
-
You already created an issue for this previously at #1756 and have in both cases not bothered to provide a reproduction, despite the bug report template explicitly stating that this is mandatory. I'll move this to a discussion since it's a usage question, but it's hard for anybody to help you without a reproduction. If you can come up with a reproduction, add it to the discussion, maybe someone is willing to help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
https://www.xxx.com/test not working。
https://www.xxx.com/zh/test is working。
error:
404This page could not be found.
routing.ts:
Verifications
Mandatory reproduction URL
https://www.xucongyong.com/test
Reproduction description
x
Expected behaviour
x
Beta Was this translation helpful? Give feedback.
All reactions