core: 支持系统级语言设置

This commit is contained in:
undefined committed 2021-01-09 22:44:38 +08:00
1 parent 5a7114ed8c
commit 1aeaf14a03
4 files changed
+10 -5

No files matched your search

+1 -1
View File
@@ -43,7 +43,7 @@ String.prototype.rawformat = function rawFormat(object) {
};
String.prototype.translate = function translate(...languages: string[]) {
if (!languages.length) languages = ['zh_CN'];
languages.push(global.Hydro.model.system.get('server.language'));
for (const language of languages) {
if (!language) continue;
if (locales[language]) {