初步集成next-intl支持多语言

This commit is contained in:
xintaofei
2026-03-07 10:08:05 +08:00
parent efd87dbd9c
commit 934f689b08
20 changed files with 1186 additions and 89 deletions

View File

@@ -1,7 +1,9 @@
import type { NextConfig } from "next"
import createNextIntlPlugin from "next-intl/plugin"
const isProd = process.env.NODE_ENV === "production"
const internalHost = process.env.TAURI_DEV_HOST || "localhost"
const withNextIntl = createNextIntlPlugin("./src/i18n/request.ts")
const nextConfig: NextConfig = {
output: "export",
@@ -11,4 +13,4 @@ const nextConfig: NextConfig = {
assetPrefix: isProd ? undefined : `http://${internalHost}:3000`,
}
export default nextConfig
export default withNextIntl(nextConfig)