NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #2832 most downloaded on npm
Internationalization for react done right. Using the i18next i18n ecosystem.
Latest stable
18.0.3
Last release 3 days ago
19 Nov 2026
Release timing varies
gaps range from 8 days to 2 months
Some releases are documented
notes for 20 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
412 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
publish changes to typescript definitions 567
persisting generated i18nOptions on withI18n hoc to avoid rerenders on pure components
- add typedefinitions 557
Your coding agent can read these notes before it upgrades. Set up the MCP server →
add innerRefs support to withContext, withI18n
replaces getWrappedInstance on withNamespaces / translate with passing a innerRef https://github.com/facebook/react/issues/13456 534
- fix SSR cases
fix issue with context not applied when merging i18n options
add prop-types to peer deps as long we use the ponyfill create-react-context
- remove prop-types in tests
remove proptypes dependency - not needed anylonger as we do not define old context
use @babel/plugin-transform-runtime
translate HOC was renamed to "withNamespaces" as it controls which namespaces should be loaded
translate HOC was renamed to "withNamespaces" as it controls which namespaces should be loaded
I18n render prop was renamed to "NamespacesConsumer" as it controls which namespaces should be "consumed"
there is a new context.consuming HOC "withI18n" adds i18n, t to component props (without the extra options of withNamespaces)
there is a simplification for interpolation in translations
'Hello <1><0>{{name}}</0></1>, you have <3>{{count}}</3> message. Open <5>hear</5>.'
can be written as:
'Hello <1>{{name}}</1>, you have {{count}} message. Open <5>hear</5>.'
=> there is no need to add <0>...</0> around interpolated values anylonger
=> your old files having those extra pseudo tags will still work without needing to change them
Using react's new context api
should be non breaking in most cases, with following exceptions:
still we prefer to increase this to a major version as beside the described egde cases there might be other effects we not have covered with our tests
Load missing namespaces when updating ns prop on I18n component 523
pass down lng via props in I18n and translate HOC - for use cases like 508
fix related to issue #504: also report default Namespace with translate() 506
Added reportNS function to I18NextProvider to report used namespaces 500
fix small issue in icu.macro introduced on refactoring
Adds import { Trans, Plural, Select } from react-i18next/icu.macro a babel macro to allow nicer components used with ICU format (which as default woul
react-i18next/icu.macro a babel macro to allow nicer components used with ICU format (which as default would result in invalid JSX). discussionSkip custom html tags in Trans component translation PR482
Support defaultNS from I18nextProvider props PR478
i18n in context is optional as it can be passed via props too 474
avoid rerenders triggered by bound i18next events while I18n or translate hoc are not ready yet (omitBoundRerender: true --- is default) 456
Allow Trans component to be used with props only for icu use case (next step babel makro) 439
Allow to pass a function as parent for component PR424
removes componentWillMount lifecycle method from I18n.js render props as it will get deprecated on react 16.3 404
Fix reference to props in constructor PR411
passes down tReady from translate hoc for cases you prefer showing a placeholder instead of default return null in case of wait: true and not yet load
enables setting prop ns on Trans component to override namespace passed by render prop or hoc
ns on Trans component to override namespace passed by render prop or hocreorder selection of i18n in I18n render prop
reorder selection of i18n in I18n render prop
more save access to options in general
more save access to options.react
replace Interpolate PureComponent with Component to assert it gets rerendered on lng change
remove react-dom from peer dependencies as module is used in react-native too
Allow translate HOC to take a function for getting namespaces 372
Add usePureComponent option PR357
fixes: bring back Trans component t fc from context
optional take i18n.t in Trans component if non t function passed in via props or context
fixes rendering in Trans component in case of no parent
working Trans component without the need of setting options.react
[BREAKING] As with react 16 you can return multiple elements from render - based on that we do not need to return a wrapper any longer from Trans comp
Starting with v7.0.0 Trans component per default won't add a parent div around content passed as children. It will just return it's children.
You still got the option to set a parent if you prefer content being wrapped.
If you prefer wrapping for all your Trans components (or for backwards compatibility) you can set option react.defaultTransParent to an element on i18next init.
adds hashTransKey function for custom key generation in case of not passing a key to Trans component and not like having the source value as key
pre-check namespaces to avoid unnecessary initial null render PR336
null render PR336remove PureComponent from Trans
fixes support passing i18n and t to Trans as props PR315
- fixes translate hoc build
stop using PureComponent and use Component again...seems we get an issue with react-router v4 if using PureComponents
rebuild needed cause of uppercasing for components name was not reflected in last build
remove react from dependencies - not sure how that came into the package.json
[BREAKING] removes options to set translateFuncName in translate hoc (was not supported in Trans and Interpolate component anyway)
fixes AST implementation for preact
replaces regex used to parse nodes from string to an ast implementation solving #298
Pass extra parameters to Trans parent component
adds module export in package.json pointing to es dist files.
you now can set i18n instance on translate hoc once using setI18n:
import translate from 'react-i18next';
import i18n from './i18n';
translate.setI18n(i18n);
[BREAKING] we no longer accept wait to be specified on i18next init options like { wait: true } -> all overrides for the translate hoc now have to be
{ wait: true } -> all overrides for the translate hoc now have to be in child react like { react: { wait: true } }translateFuncName as we need that upfront to define childContextTypes)i18next.init({
// ... other options
react: {
wait: false,
withRef: false,
bindI18n: 'languageChanged loaded',
bindStore: 'added removed',
nsMode: 'default'
}
});
translateFuncName) by using:import translate from 'react-i18next';
translate.setDefaults({
wait: false,
withRef: false,
bindI18n: 'languageChanged loaded',
bindStore: 'added removed',
nsMode: 'default',
translateFuncName: 't'
});
make trans component work with preact and preact-compat
Trans component parent element configurable PR278
optimize generated defaultValue for components not having children
move react, prop-types, ... to peerDependency again
One column per quarter.