邃芒慧语、照片说话(PC) https://photo.metavatar.cc/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
618 B

  1. import { createI18n } from 'vue-i18n';
  2. import { useAppStore } from '@/store/modules/app';
  3. import { store } from '@/store/index'; // 因为不是在setup环境而是js中,必须重新初始化加载store
  4. const appStore = useAppStore(store); //pinia
  5. // const appStore = useAppStore();
  6. // 本地语言包
  7. import enLocale from './package/en';
  8. import zhCnLocale from './package/zh-cn';
  9. const messages = {
  10. 'zh-cn': {
  11. ...zhCnLocale
  12. },
  13. en: {
  14. ...enLocale
  15. }
  16. };
  17. const i18n = createI18n({
  18. legacy: false,
  19. locale: appStore.language,
  20. messages: messages,
  21. globalInjection: true
  22. });
  23. export default i18n;