Skip to content

Commit a1d7c8e

Browse files
committed
restore en as default lng for i18next
Signed-off-by: Michael Robinson <merobi@gmail.com>
1 parent ebbd680 commit a1d7c8e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

web/src/i18n/config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ import LanguageDetector from 'i18next-browser-languagedetector'
44
const i18next = require('i18next')
55

66
const DETECTION_OPTIONS = {
7-
order: ['localStorage', 'navigator'],
7+
order: ['localStorage'],
8+
lookupLocalStorage: 'lng',
89
caches: ['localStorage']
910
};
1011

12+
if (localStorage.getItem('i18nextLng') === null) {
13+
localStorage.setItem('i18nextLng', 'en')
14+
}
15+
1116
i18next
1217
.use(LanguageDetector)
1318
.use(initReactI18next)

0 commit comments

Comments
 (0)