1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

Desktop: Auto-detect locale on startup

This commit is contained in:
Laurent Cozic
2023-05-10 11:05:55 +01:00
parent 5371c97ccd
commit 052a829167
6 changed files with 27 additions and 8 deletions

View File

@@ -139,7 +139,7 @@ function shimInit(options = null) {
};
shim.detectAndSetLocale = function(Setting) {
let locale = process.env.LANG;
let locale = shim.isElectron() ? shim.electronBridge().getLocale() : process.env.LANG;
if (!locale) locale = defaultLocale();
locale = locale.split('.');
locale = locale[0];