PicList/src/main/utils/handleI18n.ts

7 lines
235 B
TypeScript
Raw Normal View History

2022-02-20 08:30:22 -05:00
import db from '~/main/apis/core/datastore'
2022-08-20 04:44:55 -04:00
import { i18nManager } from '~/main/i18n'
2022-02-20 08:30:22 -05:00
export const initI18n = () => {
const currentLanguage = db.get('settings.language') || 'zh-CN'
2022-08-20 04:44:55 -04:00
i18nManager.setCurrentLanguage(currentLanguage)
2022-02-20 08:30:22 -05:00
}