mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +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')
|
initHTMLPath = path.join(appDir, 'electron', 'init.html')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 改进桌面端初始化时使用的外观语言 https://github.com/siyuan-note/siyuan/issues/6803
|
||||||
let languages = app.getPreferredSystemLanguages();
|
let languages = app.getPreferredSystemLanguages();
|
||||||
let language = "en_US";
|
let language = languages && 0 < languages.length && "zh-Hans-CN" === languages[0] ? "zh_CN": "en_US";
|
||||||
if (languages && 0 < languages.length) {
|
|
||||||
if ("zh-Hans-CN" === languages[0]) {
|
|
||||||
language = "zh_CN"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
firstOpenWindow.loadFile(
|
firstOpenWindow.loadFile(
|
||||||
initHTMLPath, {
|
initHTMLPath, {
|
||||||
query: {
|
query: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue