diff --git a/public/js/admin_bundle.js b/public/js/admin_bundle.js index b99bb89..8d372c9 100644 --- a/public/js/admin_bundle.js +++ b/public/js/admin_bundle.js @@ -92816,7 +92816,8 @@ var PageRoot = function (_React$Component) { return response.json(); }).then(function (json) { if (json.status != 1) return location.replace('/'); - var lang = navigator.language.substring(0, 2); + var slang = sessionStorage.getItem('lang'); + var lang = slang || navigator.language.substring(0, 2); fetch('/locales/' + lang + '.json').then(function (response) { if (response.status == 200) return response.json(); return {}; diff --git a/src/admin.js b/src/admin.js index 209f658..d4d00e6 100644 --- a/src/admin.js +++ b/src/admin.js @@ -39,7 +39,8 @@ class PageRoot extends React.Component { .then(response=>response.json()) .then(json => { if(json.status != 1) return location.replace('/'); - let lang = navigator + let slang = sessionStorage.getItem('lang'); + let lang = slang || navigator .language .substring(0, 2); fetch(`/locales/${lang}.json`).then(response => {