From 08d5c942a46df926e18b807a11761e447465def9 Mon Sep 17 00:00:00 2001 From: Marco Rodolfi Date: Wed, 3 May 2023 22:51:18 +0200 Subject: Hotfix for i18n where the detector was overriding localStorage (#439) * Hotfix for i18n where the detector was overriding localStorage * Please, pnpm, cooperate --- frontend/src/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'frontend/src') diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 27217f96..b9edc0b1 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -1,6 +1,5 @@ import { Navigation, Router, sleep } from 'decky-frontend-lib'; import i18n from 'i18next'; -import LanguageDetector from 'i18next-browser-languagedetector'; import Backend from 'i18next-http-backend'; import { initReactI18next } from 'react-i18next'; @@ -42,7 +41,6 @@ declare global { i18n .use(Backend) - .use(LanguageDetector) .use(initReactI18next) .init({ load: 'currentOnly', @@ -51,6 +49,7 @@ declare global { lookupQuerystring: 'lng', }, //debug: true, + lng: navigator.language, fallbackLng: 'en-US', interpolation: { escapeValue: true, -- cgit v1.2.3