Replace react-intl with next-intl and consolidate lang files.
Migrate i18n from react-intl to next-intl, eliminating the formatjs compilation pipeline. Translation files now live as nested JSON in public/intl/messages/ (single source of truth), removing the duplicated src/lang/ directory and the copy/compile build steps. The useMessages() hook API is preserved so all 195+ consumer components are unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
fed8d4c71a
commit
a1890e9261
+5
-2
@@ -1,6 +1,9 @@
|
||||
import 'dotenv/config';
|
||||
import createNextIntlPlugin from 'next-intl/plugin';
|
||||
import pkg from './package.json' with { type: 'json' };
|
||||
|
||||
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
|
||||
|
||||
const TRACKER_SCRIPT = '/script.js';
|
||||
|
||||
const basePath = process.env.BASE_PATH || '';
|
||||
@@ -164,7 +167,7 @@ if (cloudMode) {
|
||||
}
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
export default {
|
||||
export default withNextIntl({
|
||||
reactStrictMode: false,
|
||||
env: {
|
||||
basePath,
|
||||
@@ -202,4 +205,4 @@ export default {
|
||||
async redirects() {
|
||||
return [...redirects];
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user