X-Git-Url: https://git.auder.net/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fstore.js;fp=client%2Fsrc%2Fstore.js;h=52870e0af4cd505204b32eef7f2ffee30ea004ae;hb=dfa6eb760d51263b051f72d0fe968458d369f187;hp=e7e869717f76ec150e1b66fcea0c2d3e8e226190;hpb=8aa418f6d6761b95429c4f7120481e709814a1b9;p=vchess.git diff --git a/client/src/store.js b/client/src/store.js index e7e86971..52870e0a 100644 --- 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(navigator.language) ? navigator.language : "en"); + (supportedLangs.includes(navLanguage) ? navLanguage : "en"); this.setTranslations(); }, updateSetting: function(propName, value) {