I’m sharing my middleware.ts
.
Its my first time with localization in next.js
, I made it work, but now I’m struggling with URL
, because I do not wish to have "cs"
in default version, and something is adding the "cs"
to URL
even if I do not type it.
Is there any settings in next-intl
to prevent this?
I don’t even know where to start, I have tried to remove "cs"
from matcher
, but I belive that has no effect on “adding cs to URL”.
Thank you for any advice.
export default createMiddleware({
// A list of all locales that are supported
locales: ["cs", "en"],
// Used when no locale matches
defaultLocale: "cs",
});
export const config = {
// Match only internationalized pathnames
matcher: ["/", "/(cs|en)/:path*"],
};