projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix language detection
[vchess.git]
/
client
/
src
/
store.js
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"];
highlight: localStorage.getItem("highlight") == "true"
};
const supportedLangs = ["en", "es", "fr"];
+ const navLanguage = navigator.language.substr(0,2);
this.state.lang =
localStorage["lang"] ||
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) {
this.setTranslations();
},
updateSetting: function(propName, value) {