add zh_cn
This commit is contained in:
+4
-1
@@ -41,6 +41,9 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
||||
case 'ru':
|
||||
messages = (await import('../locales/ru/common.json')).default;
|
||||
break;
|
||||
case 'zh':
|
||||
messages = (await import('../locales/zh/common.json')).default;
|
||||
break;
|
||||
default:
|
||||
messages = (await import('../locales/en/common.json')).default;
|
||||
}
|
||||
@@ -51,4 +54,4 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
||||
timeZone: 'Europe/Paris',
|
||||
now: new Date()
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { defineRouting } from 'next-intl/routing';
|
||||
|
||||
export const routing = defineRouting({
|
||||
locales: ['en', 'fr', 'de', 'es', 'it', 'ja', 'ko', 'nl', 'pl', 'pt', 'ru'],
|
||||
locales: ['en', 'fr', 'de', 'es', 'it', 'ja', 'ko', 'nl', 'pl', 'pt', 'ru', 'zh'],
|
||||
defaultLocale: 'en',
|
||||
localePrefix: 'never'
|
||||
});
|
||||
|
||||
export const locales = routing.locales;
|
||||
export const defaultLocale = routing.defaultLocale;
|
||||
export type Locale = (typeof locales)[number];
|
||||
export type Locale = (typeof locales)[number];
|
||||
|
||||
Reference in New Issue
Block a user