How to make Next.js i18n routing work with Pages?

I use this command to build my Next.js project:
pnpm dlx @cloudflare/next-on-pages

And deploy:
CLOUDFLARE_ACCOUNT_ID=38bc8e8ffacb44cf6ab6293124ef8e28 wrangler pages publish .vercel/output/static


My next config:
{
  reactStrictMode: true,
  i18n: {
    locales: ['en', 'zh-TW'],
    defaultLocale: 'en',
  },
  trailingSlash: true,
}
Was this page helpful?