特性-市场插件的国际化支持

This commit is contained in:
sunyuqiang
2023-08-01 14:01:19 +08:00
parent cc6098258c
commit a2f9e1d01c
26 changed files with 610 additions and 228 deletions

View File

@@ -0,0 +1,19 @@
import { createI18n } from 'vue-i18n';
import messages from './langs';
const { remote } = window.require('electron');
const { perf } = remote.getGlobal('OP_CONFIG').get();
console.log(messages);
console.log(perf);
// 2. Create i18n instance with options
const i18n = createI18n({
legacy: false,
locale: perf.common.lang || 'zh-CN', // set locale
fallbackLocale: 'zh-CN', // set fallback locale
messages, // set locale messages
// If you need to specify other options, you can set other options
// ...
});
export default i18n;