'强制变更文件名,ureport国际化文件置入'

This commit is contained in:
gtz 2022-09-02 16:34:14 +08:00
bovenliggende 076eaa5f2a
commit e46c392e0f
5 gewijzigde bestanden met toevoegingen van 25 en 0 verwijderingen

25
public/i18n.js Normal file
Bestand weergeven

@ -0,0 +1,25 @@
/**
* Created by Jacky.Gao on 2017-10-01.
*/
import defaultI18nJsonData from './designer.json';
import en18nJsonData from './designer_en.json';
export default function buildLocal () {
let language = getCookie('language') || 'zh-CN';
window.i18n = defaultI18nJsonData;
if (language !== 'zh-CN') {
window.i18n = en18nJsonData;
}
}
function getCookie (name) {
var strcookie = document.cookie;//获取cookie字符串
var arrcookie = strcookie.split("; ");//分割
//遍历匹配
for (var i = 0; i < arrcookie.length; i++) {
var arr = arrcookie[i].split("=");
if (arr[0] == name){
return arr[1];
}
}
return "";
}