unstale

npm / i18next

i18next

What changed in i18next 25 to 26, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

13 breaking4 security18 new APIs and options4 performance6 behavior and defaults3 tooling46 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

i18next 2653 changes

Breaking changes 11

  • Clones no longer inherit preload by default, avoiding redundant loading across preloaded languages and namespaces. Passing preload to cloneInstance() retains the old behavior.

    26.4.7release notes

  • nest() resolves $t(...) in a single pass, so text kept literal by skipOnVariables is no longer resolved by an outer loop; this also avoids quadratic work on unclosed input.

    26.4.4release notes

  • The package no longer emits this file because it was byte-identical to dist/esm/i18next.js.

    26.0.7release notes

  • The Formatter returns undefined and null values as-is instead of producing NaN when the value is missing.

    26.0.1release notes

  • The global suppression state for the console support notice is removed.

    26.0.0release notes

  • The environment variable for suppressing the console support notice is removed.

    26.0.0release notes

  • Custom formatters can be registered through the formatter service as part of the new formatting approach.

    26.0.0release notes

  • The deprecated compatibility mapping from initImmediate to initAsync is removed; use initAsync instead.

    26.0.0release notes

  • The legacy monolithic format function is no longer supported; use the built-in Formatter or a custom Formatter module.

    26.0.0release notes

  • The option for controlling the console support notice is removed along with the notice.

    26.0.0release notes

  • The unused option is removed; the v4 test compatibility layer now defaults to true internally.

    26.0.0release notes

Security 4

  • Warns when escapeValue: false is combined with interpolated variables inside a $t nesting-options block, where quotes in attacker-controlled values can inject additional nesting options.

    26.0.6release notes

  • Strips CR, LF, NUL, and other C0/C1 control characters from string log arguments to prevent log forging through user-controlled values.

    26.0.6release notes

  • Regex-escapes the delimiter to prevent ReDoS from regex metacharacters and avoid breaking the {{- var}} syntax.

    26.0.6release notes

  • Regex-escapes the delimiter to prevent ReDoS from regex metacharacters and avoid breaking the {{- var}} syntax.

    26.0.6release notes

New APIs and options 10

  • Overrides the inferred type for an ICU format or MF2 function name, including custom functions.

    26.5.0release notes

  • Opting into ICU or MF2 parsing types t() options from message arguments, reporting missing, misspelled, and wrongly typed arguments, including when options are omitted.

    26.5.0release notes

  • Adds a mergeable augmentation surface for namespace resource types, allowing packages to contribute namespaces independently; same-key, different-literal conflicts are dropped to avoid poisoning t() overload resolution.

    26.3.0release notes

  • Exposes enableSelector on InitOptions so selector settings typecheck without a module augmentation; accepts false, true, 'optimize', or 'strict'.

    26.2.0release notes

  • Adds a CustomTypeOptions flag, defaulting to true, to disable type-level parsing of translation strings for {{variable}} patterns; runtime interpolation is unaffected.

    26.2.0release notes

  • Opt-in strict mode exposes every namespace only under its own key on $, and rewrites a leading selector path segment matching the scope's namespace list as a namespace prefix, including the primary.

    26.1.0release notes

  • A fourth optional fixedOpts argument carries scopeNs so selector paths with a namespace prefix route correctly under useTranslation([nsA, nsB]), without changing the bound resolution namespace.

    26.0.10release notes

  • The TypeScript signature now accepts an optional sixth options parameter, matching the runtime API.

    26.0.3release notes

  • Custom formatters can be registered through the formatter service using the cached registration method.

    26.0.0release notes

  • EventEmitter adds one-time event subscriptions, and the method is also added to the i18n and ResourceStore type interfaces.

    26.0.0release notes

Performance 4

  • Type-checking the selector API with context is no longer quadratic in object size; context variants are collected in one pass, avoiding excessive type instantiation and out-of-memory failures.

    26.5.1release notes

  • Type-checking t() calls against large namespaces is no longer quadratic; cached key unions and direct literal-key lookups reduce check time without changing keys, return types, or errors.

    26.5.1release notes

  • Non-empty bundle checks are cached across instances, making later checks O(1). Bundles emptied manually with delete remain counted as having translations; use removeResourceBundle() instead.

    26.4.3release notes

  • Caches hierarchy resolution results per (code, fallbackCode) pair to reduce per-call cost. If other resolution-relevant options change at runtime, call i18next.services.languageUtils.clearCache(); dynamic fallbacks remain uncached.

    26.4.0release notes

Behavior and default changes 1

  • Unformatted interpolation values are now typed as string | number; formatted values retain their precise types, and count remains number-only.

    26.0.9release notes

Fixes and other changes 23

  • On TypeScript 7, failed t calls with missing, misspelled or wrongly typed options again report the relevant option error, matching TypeScript 5 and 6.

    26.5.2release notes

  • With default non-strict key checks, missing or misspelled interpolation variables in an options object now report the missing variable instead of a misleading default-value overload error.

    26.5.0release notes

  • Loads the new namespace for the clone's language and fallbacks instead of every preloaded language.

    26.4.7release notes

  • Formatted fallback language codes already in the hierarchy are no longer added a second time, preventing duplicate language lookups while preserving order.

    26.4.6release notes

  • Checks the resolved language code actually loaded, or waits for the fallback when lng is outside supportedLngs, preventing readiness loops.

    26.4.5release notes

  • Nested values containing $&, $, $' or $$` now stay literal, and non-string values returned by formatters in the nesting chain are stringified.

    26.4.2release notes

  • The selector-form keyPrefix overload is now available when enableSelector is 'strict', preserving the returned t function's keyPrefix scope.

    26.4.1release notes

  • The optional TypeScript peer dependency range now allows TypeScript 7, avoiding an npm install peer conflict.

    26.3.6release notes

  • The returnDetails path no longer mutates the passed replace object; returned usedParams still includes count.

    26.3.5release notes

  • With skipOnVariables: true and escapeValue: true, placeholders inside interpolated values containing escapable characters now stay literal.

    26.3.5release notes

  • Multiline options objects in nested $t() calls are now parsed correctly, so nested lookups receive their options and resolve placeholders.

    26.3.5release notes

  • With deep merging and overwrite enabled, inherited built-in properties are now copied as plain own data instead of being recursed into, preventing shared built-ins from being corrupted.

    26.3.4release notes

  • Selector calls with context and returnObjects: true now preserve the full shape of heterogeneous JSON array elements instead of collapsing their types.

    26.3.3release notes

  • Parenthesised formatter options containing the format separator now work at any position in a chain, preventing inner commas from corrupting output.

    26.3.2release notes

  • Using keyPrefix no longer widens t()'s return type to include values from sibling keys in the namespace.

    26.3.1release notes

  • Restores the pre-v25.10.4 type shape so plain arrow functions can be assigned to ExistsFunction-typed variables; direct i18next.exists calls still narrow keys, and custom wrappers can use typeof i18next.exists for narrowing.

    26.0.8release notes

  • When a plural lookup misses, the debug log shows the plural-resolved key instead of the base key, making the missing plural category clear.

    26.0.7release notes

  • Calling changeLanguage() on a cloneInstance() now updates language state when the target language is not yet loaded, avoiding a race that could skip setLngProps.

    26.0.5release notes

  • Inline formatting options now resolve to their base format type, such as number for currency, instead of falling back to string.

    26.0.4release notes

  • t("key", {} as TOptions) no longer produces a type error when context is unknown, because the context constraint bypasses strict checking.

    26.0.2release notes

  • The Formatter no longer crashes when alwaysFormat is true and no format specifier is present.

    26.0.1release notes

  • The generic parameter naming inconsistency between CJS and ESM type definitions is fixed.

    26.0.0release notes

  • The cache moves from module scope to the Translator instance, preventing cross-instance state leakage.

    26.0.0release notes

i18next 2541 changes

Breaking changes 2

  • When a key resolves to plural forms, the selector API now enforces { count: number }.

    25.9.0release notes

  • getCleanedCode now replaces all underscores.

    25.8.14release notes

New APIs and options 8

  • Exports a stable, readable helper type for typing selector function props.

    25.10.9release notes

  • The support notice check also checks the I18NEXT_NO_SUPPORT_NOTICE environment variable.

    25.10.3release notes

  • Allows custom formatters to be typed via CustomTypeOptions.

    25.10.0release notes

  • Supports selector syntax in getFixedT and per-call options.

    25.10.0release notes

  • The selector API now accepts an array of selector functions, analogous to an array of keys.

    25.8.18release notes

  • An option can suppress the support message.

    25.8.2release notes

  • Type definitions were added for the transDefaultProps option in react-i18next.

    25.7.3release notes

  • Exports the InterpolationMap type for use by developers.

    25.6.2release notes

Behavior and default changes 5

  • The support notice is suppressed automatically when NODE_ENV=production.

    25.10.10release notes

  • Selector functions used as keyPrefix now provide full type-safe key narrowing, scoping the returned t function to the prefix subtree.

    25.10.5release notes

  • The i18nKey prop accepts SelectorKey values, allowing selector keys to be used with Trans.

    25.10.4release notes

  • The selector callback is constrained against resource definitions to catch invalid keys at compile time; optional ns and keyPrefix options support non-default namespace and prefix contexts.

    25.10.2release notes

  • Returns a branded SelectorKey type that t() accepts directly, enabling pre-computed and reusable translation keys.

    25.10.0release notes

Tooling 3

  • Type definitions now support TypeScript 6.

    25.10.7release notes

  • TypeScript 6 is supported, addressing the cited react-i18next issue.

    25.10.6release notes

  • Interpolation values are automatically typed from built-in format specifiers, such as number for number and Date for datetime.

    25.10.0release notes

Fixes and other changes 23

  • Reordered overloads so Parameters<TFunction> resolves to the general selector signature instead of the branded SelectorKey type.

    25.10.8release notes

  • FilterKeys now excludes base keys with context variants when the provided context matches none of those variants.

    25.10.1release notes

  • In selector mode, preserves non-context, non-plural leaf keys when context is provided, fixing incorrect type narrowing with returnObjects: true.

    25.10.0release notes

  • String unions with invalid members are now correctly detected as type errors when used as the context option.

    25.9.0release notes

  • The selector now resolves namespaces against the effective ns rather than the global init options.

    25.8.20release notes

  • Fixes namespace resolution for a single-string ns and the primary namespace in an array; only paths starting with a secondary namespace in a multi-namespace array are rewritten.

    25.8.19release notes

  • The TypeScript return type is now this instead of void, enabling proper method chaining.

    25.8.16release notes

  • Fixes the Selector API so it can resolve namespaces.

    25.8.15release notes

  • Reverts the fix for compatibility with moduleResolution bundler.

    25.8.11release notes

  • Guards against null matchedDoubleQuotes while parsing the nesting option.

    25.8.10release notes

  • Escapes nestingOptionsSeparator during nesting option parsing.

    25.8.9release notes

  • Adds the missing toJSON declaration to the types.

    25.8.8release notes

  • Avoids a ReferenceError crash when the Intl API is unavailable.

    25.8.7release notes

  • The return value type definition for getFixedT() was corrected to address an incomplete type definition.

    25.8.6release notes

  • Fixes compatibility with moduleResolution set to bundler.

    25.8.5release notes

  • Fixes crashes when a backend in the backends array has no name property.

    25.8.4release notes

  • Fixes Namespace inference for the selector ns option.

    25.8.1release notes

  • Fixes the fallback for TFunctionReturn.

    25.8.0release notes

  • Fixes interpolation breaking when an instance is cloned.

    25.7.4release notes

  • Fixes invalid overwriting of the default value for overloadTranslationOptionHandler.

    25.7.2release notes

  • A wrong TypeScript signature was removed.

    25.7.1release notes

  • Creates a new interpolator when interpolation options are passed in, addressing issue 2371.

    25.7.0release notes

  • Fixes createInstance not existing on an instance.

    25.6.1release notes