projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8aa418f
)
Fix language detection
author
Benjamin Auder
<benjamin.auder@somewhere>
Sat, 29 Feb 2020 02:51:41 +0000
(
03:51
+0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Sat, 29 Feb 2020 02:51:41 +0000
(
03:51
+0100)
client/src/store.js
patch
|
blob
|
blame
|
history
diff --git
a/client/src/store.js
b/client/src/store.js
index
e7e8697
..
52870e0
100644
(file)
--- a/
client/src/store.js
+++ b/
client/src/store.js
@@
-60,9
+60,10
@@
export const store = {
highlight: localStorage.getItem("highlight") == "true"
};
const supportedLangs = ["en", "es", "fr"];
+ const navLanguage = navigator.language.substr(0,2);
this.state.lang =
localStorage["lang"] ||
- (supportedLangs.includes(nav
igator.language) ? navigator.l
anguage : "en");
+ (supportedLangs.includes(nav
Language) ? navL
anguage : "en");
this.setTranslations();
},
updateSetting: function(propName, value) {