西藏巴青项目

index.js 403B

123456789101112131415161718192021
  1. import { createI18n } from 'vue-i18n'
  2. import zh from '@/locale/zh'
  3. import bo from '@/locale/bo'
  4. import { getStoredLocale } from '@/utils/locale'
  5. export function setupI18n(app) {
  6. const locale = getStoredLocale()
  7. const i18n = createI18n({
  8. legacy: true,
  9. globalInjection: true,
  10. locale,
  11. fallbackLocale: 'zh',
  12. messages: {
  13. zh,
  14. bo
  15. }
  16. })
  17. app.use(i18n)
  18. return i18n
  19. }