fix(web): wire up next-intl i18n — install dep, add locale middleware, wrap next config

The i18n architecture (config, routing, translation files, locale pages) was
already built but non-functional due to three missing pieces:
1. next-intl not listed in package.json
2. middleware.ts not using createMiddleware from next-intl/middleware
3. next.config.js not wrapped with createNextIntlPlugin

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-09 09:00:59 +07:00
parent b2d60e27db
commit 7f694e2e60
12 changed files with 176 additions and 70 deletions

View File

@@ -1,4 +1,7 @@
const { withSentryConfig } = require('@sentry/nextjs');
const createNextIntlPlugin = require('next-intl/plugin');
const withNextIntl = createNextIntlPlugin('./i18n/request.ts');
/** @type {import('next').NextConfig} */
const nextConfig = {
@@ -44,7 +47,7 @@ const nextConfig = {
},
};
module.exports = withSentryConfig(nextConfig, {
module.exports = withSentryConfig(withNextIntl(nextConfig), {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
silent: !process.env.CI,