File tree 6 files changed +25
-25
lines changed
6 files changed +25
-25
lines changed Original file line number Diff line number Diff line change
1
+ // Can be imported from a shared config
2
+ export const locales = [
3
+ 'ar' ,
4
+ 'en' ,
5
+ 'en-GB' ,
6
+ 'es' ,
7
+ 'ewe-BJ' ,
8
+ 'fon-BJ' ,
9
+ 'fr' ,
10
+ 'hau-NG' ,
11
+ 'yor-NG' ,
12
+ 'ja' ,
13
+ 'ko' ,
14
+ 'vi' ,
15
+ 'zh-CN' ,
16
+ 'zh-TW'
17
+ ] as const ;
18
+
19
+ export const defaultLocale = 'en' ;
Original file line number Diff line number Diff line change 1
1
import { notFound } from 'next/navigation' ;
2
2
import { getRequestConfig } from 'next-intl/server' ;
3
-
4
- // Can be imported from a shared config
5
- export const locales = [
6
- 'ar' ,
7
- 'en' ,
8
- 'en-GB' ,
9
- 'es' ,
10
- 'ewe-BJ' ,
11
- 'fon-BJ' ,
12
- 'fr' ,
13
- 'hau-NG' ,
14
- 'yor-NG' ,
15
- 'ja' ,
16
- 'ko' ,
17
- 'vi' ,
18
- 'zh-CN' ,
19
- 'zh-TW'
20
- ] as const ;
21
-
22
- export const defaultLocale = 'en' ;
3
+ import { locales } from './i18n' ;
23
4
24
5
export default getRequestConfig ( async ( { locale } ) => {
25
6
// Validate that the incoming `locale` parameter is valid
@@ -28,4 +9,4 @@ export default getRequestConfig(async ({ locale }) => {
28
9
return {
29
10
messages : ( await import ( `../messages/${ locale } .json` ) ) . default ,
30
11
} ;
31
- } ) ;
12
+ } ) ;
Original file line number Diff line number Diff line change 1
1
import createNextIntlPlugin from 'next-intl/plugin' ;
2
2
import { withSentryConfig } from "@sentry/nextjs" ;
3
3
4
- const withNextIntl = createNextIntlPlugin ( ) ;
4
+ const withNextIntl = createNextIntlPlugin ( './i18n/request.ts' ) ;
5
5
6
6
/** @type {import('next').NextConfig } */
7
7
const nextConfig = {
Original file line number Diff line number Diff line change 1
1
import { NextIntlClientProvider , useMessages } from 'next-intl' ;
2
2
import { setRequestLocale } from 'next-intl/server' ;
3
3
import { Lato } from 'next/font/google' ;
4
- import { locales } from '@ /i18n' ;
4
+ import { locales } from '../../../i18n /i18n' ;
5
5
import { Providers } from '../providers' ;
6
6
import Navbar from '@/components/shared/navbar/Navbar' ;
7
7
import logger from '../../../logger.config.mjs' ;
Original file line number Diff line number Diff line change 1
1
import createMiddleware from 'next-intl/middleware' ;
2
- import { locales , defaultLocale } from './i18n' ;
2
+ import { locales , defaultLocale } from '../i18n /i18n' ;
3
3
import { localePrefix } from './navigation' ;
4
4
5
5
export default createMiddleware ( {
Original file line number Diff line number Diff line change 1
1
import { createSharedPathnamesNavigation } from 'next-intl/navigation' ;
2
- import { locales } from './i18n' ;
2
+ import { locales } from '../i18n /i18n' ;
3
3
4
4
export const localePrefix = 'as-needed' ;
5
5
You can’t perform that action at this time.
0 commit comments