beelink/src/i18n/init.ts

27 lines
1.1 KiB
TypeScript
Raw Normal View History

2020-10-19 07:24:55 +00:00
import zh from "./zh"
2020-10-28 09:28:50 +00:00
import en from "./en"
2020-11-06 14:30:17 +00:00
import { getset } from '@/api';
2020-11-06 14:42:07 +00:00
import { geti18n } from '@/utils/i18n';
2020-11-06 14:30:17 +00:00
getset().then((res: any)=>{
zh.shichangtishi = `最短${res.timeLowerLimit}min, 最长${res.timeCeiling}min`
en.shichangtishi = `The shortest is ${res.timeLowerLimit}min and the longest is ${res.timeCeiling}min`
zh.renshutishi = `最少${res.lowerLimit}人, 最多${res.numberCeiling}`
2020-11-06 14:42:07 +00:00
en.renshutishi = `At least ${res.lowerLimit}, at most ${res.numberCeiling}`
2020-11-06 14:30:17 +00:00
en.shichangtishi = `Minimum ${res.lowerLimit} person, maximum ${res.numberCeiling} people`
zh.tixianzhu = `注:每笔提现收取${res.sxf}服务费,最低${ res.symbol + res.minmoney }`
en.tixianzhu = `Note: ${res.sxf} service fee will be charged for each withdrawal, with a minimum of ${ res.symbol + res.minmoney }`
2020-11-10 01:33:40 +00:00
// const i18n = geti18n();
// const loc = i18n.locale.value;
// i18n.locale.value = '';
// i18n.locale.value = loc;
2020-11-06 14:42:07 +00:00
console.log('i18n')
2020-11-06 14:30:17 +00:00
})
2020-10-19 07:24:55 +00:00
export default {
locale: "zh", //默认语言
2020-10-22 03:04:04 +00:00
messages: {
2020-11-06 14:30:17 +00:00
zh: zh,
en: en
2020-10-19 07:24:55 +00:00
}
}