From d5dac69760936d91d5c80c07b42a6630ac5108ad Mon Sep 17 00:00:00 2001 From: scout <1134087124@qq.com> Date: Wed, 8 Jan 2025 15:32:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(i18n):=20=E6=B7=BB=E5=8A=A0=E6=97=A5?= =?UTF-8?q?=E8=AF=AD=E5=92=8C=E7=B9=81=E4=BD=93=E4=B8=AD=E6=96=87=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/plugins/i18n.ts | 4 ++++ i18n/i18n.ts | 10 ++++++++++ i18n/locales/en-US.json | 4 ++++ i18n/locales/zh-CN.json | 4 ++++ 4 files changed, 22 insertions(+) diff --git a/app/plugins/i18n.ts b/app/plugins/i18n.ts index 58ca544..ad5fb7c 100644 --- a/app/plugins/i18n.ts +++ b/app/plugins/i18n.ts @@ -2,11 +2,15 @@ import type { Locale as TypeLocale } from '#i18n' import { Locale } from 'vant' import enUS from 'vant/es/locale/lang/en-US' import zhCN from 'vant/es/locale/lang/zh-CN' +import jaJP from 'vant/es/locale/lang/ja-JP' +import zhTW from 'vant/es/locale/lang/zh-TW' export default defineNuxtPlugin(() => { // 载入 vant 语言包 Locale.use('zh-CN', zhCN) Locale.use('en-US', enUS) + Locale.use('ja-JP', jaJP) + Locale.use('zh-TW', zhTW) if (import.meta.client) { const i18n = useNuxtApp().$i18n diff --git a/i18n/i18n.ts b/i18n/i18n.ts index a55ab11..bca5e2b 100644 --- a/i18n/i18n.ts +++ b/i18n/i18n.ts @@ -6,11 +6,21 @@ const locales: LocaleObject[] = [ file: 'zh-CN.json', name: '简体中文', }, + { + code: 'zh-TW', + file: 'zh-TW.json', + name: '繁体中文', + }, { code: 'en-US', file: 'en-US.json', name: 'English', }, + { + code: 'ja-JP', + file: 'ja-JP.json', + name: '日本语', + }, ] function buildLocales() { diff --git a/i18n/locales/en-US.json b/i18n/locales/en-US.json index 0775a0f..84748fa 100644 --- a/i18n/locales/en-US.json +++ b/i18n/locales/en-US.json @@ -1,4 +1,8 @@ { + "appSetting":{ + "appName": "FENGHE", + "appDescription": "TAIFENG INTERNATIONAL KYOTO AUCTION" + }, "menu": { "home": "Home", "profile": "Profile", diff --git a/i18n/locales/zh-CN.json b/i18n/locales/zh-CN.json index 6febaf3..67c7028 100644 --- a/i18n/locales/zh-CN.json +++ b/i18n/locales/zh-CN.json @@ -1,4 +1,8 @@ { + "appSetting":{ + "appName": "豐和", + "appDescription": "泰丰国际京都拍卖会" + }, "menu": { "home": "主页", "profile": "我的",