Skip to content
Discussion options

You must be logged in to vote

Solved! 🎉
I ended up fixing it by mapping kokr directly in my getRequestConfig and adding a prefix mapping in defineRouting.

// routing.ts
import { localeSchema } from "@/messages/_schema";
import { createNavigation } from "next-intl/navigation";
import { defineRouting } from "next-intl/routing";

export const routing = defineRouting({
  locales: localeSchema.options,
  defaultLocale: "en",
  localePrefix: {
    mode: "as-needed",
    prefixes: {
      ko: "/kr",
    },
  },
  localeDetection: true,
});

export const { Link, redirect, usePathname, useRouter } =
  createNavigation(routing);
// request.ts
import { getRequestConfig } from "next-intl/server";
import { routing } from "./rou…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@amannn
Comment options

@Adebesin-Cell
Comment options

@amannn
Comment options

@Adebesin-Cell
Comment options

Answer selected by Adebesin-Cell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants