fix(i18n): track system language on every launch instead of caching first-seen value in localStorage
This commit is contained in:
parent
5d4a50f593
commit
d3e69e042f
1 changed files with 13 additions and 0 deletions
|
|
@ -24,6 +24,19 @@ i18n
|
||||||
// PushStrings / SW normalizeLang clamp — all three surfaces live in
|
// PushStrings / SW normalizeLang clamp — all three surfaces live in
|
||||||
// the same `{en, ru}` set.
|
// the same `{en, ru}` set.
|
||||||
supportedLngs: ['en', 'ru'],
|
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: {
|
interpolation: {
|
||||||
escapeValue: false, // not needed for react as it escapes by default
|
escapeValue: false, // not needed for react as it escapes by default
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue