Merge pull request #30354 from Classic298/i18n-en-us-fallback

fix: keep en-US as the last i18n fallback when a stored locale has no bundle
This commit is contained in:
Classic298 2026-09-22 17:34:44 +02:00 • committed by GitHub
parent 344ea53068
commit fecbeac7d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,7 +76,7 @@ export const initI18n = (defaultLocale?: string, value: I18nOverrides = {}) => {
const detectionOrder = defaultLocale
? ['querystring', 'localStorage']
: ['querystring', 'localStorage', 'navigator'];
const fallbackDefaultLocale = defaultLocale ? [defaultLocale] : ['en-US'];
const fallbackDefaultLocale = defaultLocale ? [defaultLocale, 'en-US'] : ['en-US'];
return i18next
.use(resourcesToBackend(loadResource))