Feature: 添加i18n支持

This commit is contained in:
2025-08-13 16:41:58 +08:00
parent 0870a1f4fa
commit 0603533014
6 changed files with 193 additions and 44 deletions

View File

@ -54,6 +54,14 @@ export default defineNuxtConfig({
themes: ["dark"],
},
i18n: {
locales: [
{ code: 'en', language: 'en-US', name: 'English', file: 'en.json' },
{ code: 'zh', language: 'zh-CN', name: '简体中文', file: 'zh.json' },
],
defaultLocale: 'zh',
},
modules: [
"@nuxt/eslint",
"@nuxt/fonts",
@ -64,5 +72,6 @@ export default defineNuxtConfig({
"@pinia/nuxt",
"@unocss/nuxt",
"@element-plus/nuxt",
"@nuxtjs/i18n",
],
});
});