From 14087e47239b9ebc61c00a7b3ba7f08f832d7525 Mon Sep 17 00:00:00 2001 From: "v.lagerev" Date: Wed, 13 May 2026 22:54:06 +0300 Subject: [PATCH] fix(i18n): track system language on every launch instead of caching first-seen value in localStorage --- src/app/i18n.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/app/i18n.ts b/src/app/i18n.ts index 7ba67fe6..9d414e46 100644 --- a/src/app/i18n.ts +++ b/src/app/i18n.ts @@ -24,6 +24,19 @@ i18n // PushStrings / SW normalizeLang clamp — all three surfaces live in // the same `{en, ru}` set. supportedLngs: ['en', 'ru'], + // Track the device/system language on every launch. The default + // detector order checks localStorage before navigator.language, so + // i18next "sticks" to whichever language was picked on first install + // — when a user later changes their phone's system language, the + // cached value wins and the app stays in the old language. Vojo has + // no in-app language selector, so we have nothing to cache: read + // `navigator.language` every time, fall through to `htmlTag` for + // edge cases (extension iframes, very old WebViews), and write + // nothing back to storage. + detection: { + order: ['navigator', 'htmlTag'], + caches: [], + }, interpolation: { escapeValue: false, // not needed for react as it escapes by default },