mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 改进桌面端初始化时使用的外观语言 Fix https://github.com/siyuan-note/siyuan/issues/6803
This commit is contained in:
parent
0ac9b7499a
commit
4dff38c08d
1 changed files with 2 additions and 7 deletions
|
|
@ -711,14 +711,9 @@ app.whenReady().then(() => {
|
|||
initHTMLPath = path.join(appDir, 'electron', 'init.html')
|
||||
}
|
||||
|
||||
// 改进桌面端初始化时使用的外观语言 https://github.com/siyuan-note/siyuan/issues/6803
|
||||
let languages = app.getPreferredSystemLanguages();
|
||||
let language = "en_US";
|
||||
if (languages && 0 < languages.length) {
|
||||
if ("zh-Hans-CN" === languages[0]) {
|
||||
language = "zh_CN"
|
||||
}
|
||||
}
|
||||
|
||||
let language = languages && 0 < languages.length && "zh-Hans-CN" === languages[0] ? "zh_CN": "en_US";
|
||||
firstOpenWindow.loadFile(
|
||||
initHTMLPath, {
|
||||
query: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue