function createI18n(options = {}) {
    // prettier-ignore
    const __legacyMode = __VUE_I18N_LEGACY_API__ && isBoolean(options.legacy)
        ? options.legacy
        : __VUE_I18N_LEGACY_API__;
    const __globalInjection = !!options.globalInjection;
    const __instances = new Map();
    // prettier-ignore
    const __global = __VUE_I18N_LEGACY_API__ && __legacyMode
        ? createVueI18n(options)
        : createComposer(options);
    const symbol = makeSymbol((process.env.NODE_ENV !== 'production') ? 'vue-i18n' : '');
    const i18n = {
        // mode
        get mode() {
            // prettier-ignore
            return __VUE_I18N_LEGACY_API__
                ? __legacyMode
                    ? 'legacy'
                    : 'composition'
                : 'composition';
        },
        // install plugin
        async install(app, ...options) {
            if (((process.env.NODE_ENV !== 'production') || __VUE_I18N_PROD_DEVTOOLS__) && !false) {
                app.__VUE_I18N__ = i18n;
            }
            // setup global provider
            app.__VUE_I18N_SYMBOL__ = symbol;
            app.provide(app.__VUE_I18N_SYMBOL__, i18n);
            // global method and properties injection for Composition API
            if (!__legacyMode && __globalInjection) {
                injectGlobalFields(app, i18n.global);
            }
            // install built-in components and directive
            if (__VUE_I18N_FULL_INSTALL__) {
                apply(app, i18n, ...options);
            }
            // setup mixin for Legacy API
            if (__VUE_I18N_LEGACY_API__ && __legacyMode) {
                app.mixin(defineMixin(__global, __global.__composer, i18n));
            }
            // setup vue-devtools plugin
            if (((process.env.NODE_ENV !== 'production') || __VUE_I18N_PROD_DEVTOOLS__) && !false) {
                const ret = await enableDevTools(app, i18n);
                if (!ret) {
                    throw createI18nError(21 /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */);
                }
                const emitter = createEmitter();
                if (__legacyMode) {
                    const _vueI18n = __global;
                    _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
                }
                else {
                    // eslint-disable-next-line @typescript-eslint/no-explicit-any
                    const _composer = __global;
                    _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
                }
                emitter.on('*', addTimelineEvent);
            }
        },
        // global accessor
        get global() {
            return __global;
        },
        // @internal
        __instances,
        // @internal
        __getInstance(component) {
            return __instances.get(component) || null;
        },
        // @internal
        __setInstance(component, instance) {
            __instances.set(component, instance);
        },
        // @internal
        __deleteInstance(component) {
            __instances.delete(component);
        }
    };
    return i18n;
}
Vue I18n factory

@param options - An options, see the {@link I18nOptions}

@returns {@link I18n} instance

@remarks
If you use Legacy API mode, you need toto specify {@link VueI18nOptions} and `legacy: true` option.

If you use composition API mode, you need to specify {@link ComposerOptions}.

@VueI18nSee [Getting Started](../guide/)
@VueI18nSee [Composition API](../guide/advanced/composition)

@example
case: for Legacy API
```js
import { createApp } from 'vue'
import { createI18n } from 'vue-i18n'

// call with I18n option
const i18n = createI18n({
  locale: 'ja',
  messages: {
    en: { ... },
    ja: { ... }
  }
})

const App = {
  // ...
}

const app = createApp(App)

// install!
app.use(i18n)
app.mount('#app')
```

@example
case: for composition API
```js
import { createApp } from 'vue'
import { createI18n, useI18n } from 'vue-i18n'

// call with I18n option
const i18n = createI18n({
  legacy: false, // you must specify 'legacy: false' option
  locale: 'ja',
  messages: {
    en: { ... },
    ja: { ... }
  }
})

const App = {
  setup() {
    // ...
    const { t } = useI18n({ ... })
    return { ... , t }
  }
}

const app = createApp(App)

// install!
app.use(i18n)
app.mount('#app')
```

@VueI18nGeneral