feat(i18n): Implement internationalization support for your application

- Integrate the vue-i18n plugin and configure multilingual support
- Add English and Chinese translation files
This commit is contained in:
2025-10-15 15:07:47 +08:00
parent 29843bb5e5
commit 2b8f09b4b2
16 changed files with 307 additions and 26 deletions

17
src/plugins/i18n.ts Normal file
View File

@@ -0,0 +1,17 @@
import { createI18n } from 'vue-i18n'
import en from '@/locales/en.json'
import zh from '@/locales/zh.json'
const messages = {
en: en,
zh: zh
}
const i18n = createI18n({
legacy: false, // Use composition API mode
locale: 'en', // Default locale
fallbackLocale: 'en', // Fallback locale
messages
})
export default i18n