npm / @inlang/plugin-i18next
@inlang/plugin-i18next
What changed in @inlang/plugin-i18next 5 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.
6 breaking6 new APIs and options1 performance1 behavior and defaults1 tooling15 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@inlang/plugin-i18next 628 changes
Breaking changes 6
Unsupported exact numbers and conflicting forms now fail export with errors that identify the relevant number or key, bundle and locale.
Plugins returning files must also return a file for each previously read file whose messages are no longer present and are not otherwise written.
Functions with options that cannot be exported now fail with an error naming the options, function, variable, bundle and locale.
A pound sign no longer inside a plural exports as {{count, number}}; pound signs with plural offsets fail with an error naming the bundle, locale and offset.
Namespace matching uses the namespace prefix in the bundle id; overlapping matches retain existing messages in the namespace whose files contain them, while new messages use the longer namespace.
Selectors that i18next cannot represent are rejected instead of having their variants silently dropped during export.
New APIs and options 4
Add contextValues to resolve ambiguous context suffixes, including single-context resources and values containing underscores.
Mixed cardinal/ordinal MF2 bundles use a pluralType input to preserve lookup behavior.
Ordinal plural keys are parsed as a dedicated selector using Intl.PluralRules with ordinal rules, producing ordinal forms from a plain count input and preserving context-plus-ordinal keys on export.
Adds an optional metadata field, counterpart to ImportFile.toBeImportedFilesMetadata, for plugins to pass information such as an exported file's namespace to the writer.
Performance 1
Imports avoid unnecessary parsing and batch unambiguous fresh messages, speeding up imports while preserving message behavior.
Behavior and default changes 1
Namespaced pathPattern objects are resolved using ExportFile.metadata.namespace; files without a resolvable namespace fall back to file.name instead of throwing. The i18next plugin supplies namespace metadata for exported files.
Tooling 1
The plugin publishes TypeScript declarations and explicit type exports for consumers.
Fixes and other changes 15
Suffixes are now read only from the last path segment, fixing bundle IDs for keys whose group names were previously read as contexts or plural suffixes.
Deleting every message from a translation file now persists on disk, while files are kept and entries the plugin does not import are preserved where supported.
The safety check now re-imports kept files in project load order, preventing stale duplicate messages from overriding edits on the next load.
Exact zero values on un-annotated aliases of count export as key_zero, like exact zero values on count itself.
Every locale placeholder in a pathPattern is now replaced when files are read, matching save behavior.
Keys containing colons remain keys rather than being incorrectly split into namespaces when saved; colon-containing namespaces are saved to their own files.
Saving changes only edited, added or removed entries while preserving other entries, ordering and formatting; new keys are inserted after their preceding export key.
Locales written with underscores now resolve their plural rules.
Ordinal zero no longer overwrites cardinal zero on export.
Underscored i18next keys are preserved, and contexts are classified consistently across locales.
Production builds now emit the TypeScript declarations advertised by the package.
Removing the static IDE extension metadata lets Sherlock inject plugin settings into matchers, restoring inline annotations, hovers, and extraction for i18next projects.
Variants without a literal context or plural match, including catchall variants and the base key fallback, serialize back to their base key so imported bundles round-trip.
Imports use explicit catchall matches on base key variants, consistent selectors, and most-specific-first ordering so first-match-wins consumers resolve context as i18next does.
Imports _zero keys with an exact count = 0 match ahead of the plural category, plus the Intl zero-category fallback, so zero translations work in languages that do not select that category.
@inlang/plugin-i18next 52 changes
New APIs and options 2
The i18next plugin adds support for pluralization.
The i18next plugin adds support for selectors.