import { boot } from 'quasar/wrappers';
import { createI18n } from 'vue-i18n';
import globalLang from 'src/i18n';

export default boot(({ app }) => {
  // Create I18n instance
  const i18n = createI18n({
    // something vue-i18n options here ...
    legacy: false, // you must set `false`, to use Composition API
    locale: 'zh-CN', // set current locale
    formatFallbackMessages: true,
    // missingWarn: false,
    // fallbackWarn: false,
    messages: globalLang,
  });

  // Tell app to use the I18n instance
  app.use(i18n);
});
