Use language detected from browser

This commit is contained in:
Nicola Benaglia 2025-04-21 21:32:38 +02:00
parent aace10c853
commit 07ed170fd7

View File

@ -25,10 +25,6 @@ i18n
.use(initReactI18next) .use(initReactI18next)
.use(capitalize) .use(capitalize)
.init({ .init({
debug: isDev,
fallbackLng: 'en',
ns: ['auth', 'core', 'tutorial'],
supportedLngs: ['en', 'it'],
backend: { backend: {
backends: [LocalStorageBackend, HttpBackend], backends: [LocalStorageBackend, HttpBackend],
backendOptions: [ backendOptions: [
@ -40,9 +36,14 @@ i18n
}, },
], ],
}, },
debug: isDev,
fallbackLng: 'en',
interpolation: { interpolation: {
escapeValue: false, escapeValue: false,
}, },
lng: navigator.language,
ns: ['auth', 'core', 'tutorial'],
supportedLngs: ['en', 'it'],
}); });
export default i18n; export default i18n;