Newer
Older
taehui / qwilight-fe / src / i18n.ts
@Taehui Taehui on 16 Mar 335 bytes 2024-03-17 오전 1:28
import { notFound } from "next/navigation";
import { getRequestConfig } from "next-intl/server";

const locales = ["en", "ko"];

export default getRequestConfig(async ({ locale }) => {
  if (!locales.includes(locale)) {
    notFound();
  }

  return {
    messages: (await import(`@/assets/language/${locale}.json`)).default,
  };
});