feat: i18n,add en and zh-cn language.

This commit is contained in:
ex_zhangwenlei@exiot.cmcc
2024-11-22 14:53:36 +08:00
parent 8e6eff54f4
commit 391142223f
18 changed files with 189 additions and 116 deletions

View File

@@ -1,7 +1,7 @@
import { defineStore } from 'pinia';
import { defaultMusicList, defaultImageList, defaultPatternList } from './data'
import { IMusic, IImage } from '@/types/storeType';
import i18n,{Language} from '@/locales/i18n'
import i18n,{browserLanguage} from '@/locales/i18n'
// import { IPrizeConfig } from '@/types/storeType';
export const useGlobalConfig = defineStore('global', {
state() {
@@ -9,8 +9,8 @@ export const useGlobalConfig = defineStore('global', {
globalConfig: {
rowCount: 17,
isSHowPrizeList: true,
topTitle: '大明内阁六部御前奏对',
language:'zhCn',
topTitle: i18n.global.t('data.defaultTitle'),
language:browserLanguage,
theme: {
name: 'dracula',
detail: { primary: '#0f5fd3' },
@@ -223,8 +223,8 @@ export const useGlobalConfig = defineStore('global', {
this.globalConfig = {
rowCount: 17,
isSHowPrizeList: true,
topTitle: '大明内阁六部御前奏对',
language: 'zhCn',
topTitle: i18n.global.t('data.defaultTitle'),
language: browserLanguage,
theme: {
name: 'dracula',
detail: { primary: '#0f5fd3' },