wangzhibo
2026-07-16 b57020623cf0c946706573bf102e548c3a544423
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { type ModuleConfig } from '/@/cool';
import { createI18n } from 'vue-i18n';
import messages from '@intlify/unplugin-vue-i18n/messages';
import { config } from '/@/config';
 
export default (): ModuleConfig => {
    return {
        order: 100,
        toolbar: {
            component: import('./components/switch.vue')
        },
        install(app) {
            const i18n = createI18n({
                legacy: false,
                globalInjection: true,
                locale: config.i18n.locale,
                fallbackLocale: 'zh-cn',
                messages
            });
 
            app.use(i18n);
        },
 
        label: 'i18n',
        description: '国际化组件',
        author: 'COOL',
        version: '1.0.0',
        updateTime: '2025-01-11',
        doc: 'https://github.com/intlify/vue-i18n'
    };
};