This is a major breaking release:
Breaking Changes
- Remove deprecated
initImmediateoption — the backward-compatibility mapping frominitImmediatetoinitAsync(introduced in v24) has been removed. UseinitAsyncinstead. - Remove legacy
interpolation.formatfunction — the old monolithic format function (interpolation: { format: (value, format, lng) => ... }) is no longer supported. The built-in Formatter (or a custom Formatter module via.use()) is now always used. Migrate to the new formatting approach usingi18next.services.formatter.add()or.addCached()for custom formatters. - Remove console support notice — the console support notice introduced in v25.8.0 has been removed, along with the
showSupportNoticeoption and all related internal suppression logic (globalThis.__i18next_supportNoticeShown,I18NEXT_NO_SUPPORT_NOTICEenv var). See our blog post for the full story. - Remove
simplifyPluralSuffixoption — this option was unused by the core PluralResolver (which relies entirely onIntl.PluralRules). It only had an effect in the old v1/v2/v3 compatibility layer. The v4 test compatibility layer now defaults totrueinternally. - Remove deprecated
@babel/polyfillfrom devDependencies.
Improvements
- Code modernization across all source files:
- Replace
indexOf() > -1/indexOf() < 0with.includes()(~40+ occurrences) - Replace
indexOf() === 0with.startsWith()where appropriate - Replace
varwithconst,'' + objectwithString(object),.substring()with.slice() - Replace
.apply(observer, [event, ...args])with direct callobserver(event, ...args) - Remove unnecessary
.call(this, ...)in BackendConnector retry logic - Fix
array-callback-returnin LanguageUtilsgetBestMatchFromCodes - Clean up all stale
eslint-disablecomments from source files
- Replace
- EventEmitter: add
once()method for one-time event subscriptions - Memory leak fix: move module-level
checkedLoadedForcache to Translator instance, preventing cross-instance state leakage - TypeScript: fix
BackendModulegeneric parameter naming inconsistency between CJS and ESM type definitions - TypeScript: add
once()method toi18nandResourceStoretype interfaces - ESLint 9: migrate from ESLint 8 (airbnb-base) to ESLint 9 flat config with neostandard
- Vitest 4: upgrade from vitest 3 to vitest 4, migrate workspace files to
test.projectsconfig