Skip to content

Commit

Permalink
fix: better user interface language detection (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
troggy authored Jul 20, 2020
1 parent fe6f149 commit 70a9286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const getUserLocale = () => {
return [].slice.call(document.querySelectorAll('head script'))
.find(n =>
n.textContent.trim().startsWith('window[\'context\']')
).textContent.match('"interfaceLang":"(.+?)"')[1]
).textContent.match('"userLang":"(.+?)"')[1]
} catch (e) {
console.error(e)
return 'en'
Expand Down

0 comments on commit 70a9286

Please sign in to comment.