language.ts 395 B

123456789101112131415
  1. import { createI18n } from 'vue-i18n'
  2. import { localData } from '../storage'
  3. import zhCN from '@public/locales/zh-CN.json'
  4. import enUS from '@public/locales/en-US.json'
  5. const appLanguage = localData.getRef('appLanguage')
  6. export const i18n = createI18n({
  7. locale: "en-US",//appLanguage.value,
  8. fallbackLocale: 'zh-CN',
  9. messages: {
  10. 'zh-CN': zhCN,
  11. 'en-US': enUS
  12. }
  13. })