kun-galgame-vue/src/language/i18n.ts

20 lines
415 B
TypeScript
Raw Normal View History

2023-11-07 06:47:20 +00:00
import { createI18n as _createI18n } from 'vue-i18n'
2023-11-07 08:38:49 +00:00
// Get localeStorage language config
2023-08-20 13:38:40 +00:00
import { KUNGalgameLanguage } from '@/utils/getDefaultEnv'
2023-06-08 15:19:32 +00:00
2023-11-07 08:38:49 +00:00
// Import language file
2023-05-19 18:23:25 +00:00
import zh from './zh'
import en from './en'
const createI18n = (language?: string) =>
_createI18n({
locale: language || KUNGalgameLanguage,
legacy: false,
messages: {
zh,
en,
},
})
2023-05-19 18:23:25 +00:00
2023-11-07 06:47:20 +00:00
export default createI18n