部分菜单实现中英文切换

This commit is contained in:
GoEdgeLab
2023-12-12 11:47:41 +08:00
parent 1184806fe0
commit 6e84415262
12 changed files with 93 additions and 4 deletions

View File

@@ -205,8 +205,21 @@ Tea.context(function () {
return message
}
}
if (window.LANG_MESSAGES_BASE != null) {
let message = window.LANG_MESSAGES_BASE[code]
if (typeof message == "string") {
return message
}
}
return "{{ LANG('" + code + "') }}"
}
this.switchLang = function () {
this.$post("/settings/lang/switch")
.success(function () {
window.location.reload()
})
}
});
window.NotifySuccess = function (message, url, params) {