Skip to content

Commit

Permalink
fix: en switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Dec 11, 2022
1 parent 2cdcc9a commit f875d0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions view/src/locale/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import en from './en-US';

window.__i18n = window.__i18n || locale({
en,
getLanguage() {
return window.localStorage.RELIABLE_LANGUAGE || window.navigator.language;
useEn() {
const language = window.localStorage.RELIABLE_LANGUAGE || window.navigator.language;
return language.startsWith('en');
},
});

0 comments on commit f875d0c

Please sign in to comment.