chore: took off the option of looking-up docsgpt-locale lang key in localStorage on first load

pull/1032/head
utin-francis-peter 3 months ago
parent 6f41759519
commit 16ae0725e6

@ -27,13 +27,12 @@ i18n
},
fallbackLng: 'en',
detection: {
order: ['localStorage', 'navigator'], // checks localStorage for existing lang before browser's
caches: ['localStorage'], //stores detected lang to localStorage with i18nextLng key
lookupLocalStorage: 'docsgpt-locale', //using docsgpt-locale as the custom key for storing and retrieving the lang rather than the default `i18nextLng`
order: ['localStorage', 'navigator'],
caches: ['localStorage'],
lookupLocalStorage: 'docsgpt-locale',
},
});
const savedLocale = localStorage.getItem('docsgpt-locale') ?? i18n.language;
i18n.changeLanguage(savedLocale);
i18n.changeLanguage(i18n.language);
export default i18n;

Loading…
Cancel
Save