feat(front): add support for additional locales including Japanese, Korean, French, German, and Traditional Chinese in nuxt.config.ts and update app config structure for text translation

This commit is contained in:
keven1024
2026-04-07 22:53:58 +08:00
parent 249b9f2350
commit a99790c9b1
2 changed files with 10 additions and 0 deletions

View File

@@ -9,6 +9,11 @@ const useMyAppConfig = () => {
version: string
build_time: number
features: string[]
text: {
translate: {
provider: string[]
}
}
}
}>('/api/config')
return computed(() => data?.value?.data)

View File

@@ -24,6 +24,11 @@ export default defineNuxtConfig({
locales: [
{ code: 'zh-CN', name: '中文(简体)', file: 'zh-CN.json' },
{ code: 'en', name: 'English', file: 'en.json' },
{ code: 'ja', name: '日本語', file: 'ja.json' },
{ code: 'ko', name: '한국어', file: 'ko.json' },
{ code: 'fr', name: 'Français', file: 'fr.json' },
{ code: 'de', name: 'Deutsch', file: 'de.json' },
{ code: 'zh-TW', name: '中文(繁體)', file: 'zh-TW.json' },
],
},
vite: {