fix locale 404 not default

This commit is contained in:
root committed 2017-04-05 15:35:32 +08:00
1 parent b684672ad2
commit 34f2d0e24a
3 files changed
+13 -7

No files matched your search

+2 -1
View File
@@ -59,7 +59,8 @@ class Root extends React.Component {
}
componentDidMount() {
let lang = navigator
let slang = sessionStorage.getItem('lang');
let lang = slang || navigator
.language
.substring(0, 2);
fetch(`/locales/${lang}.json`).then(response => {