- 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)
- setting i18n instance and defaults can now be done by i18next.use(reactI18nextModule) making I18nextProvider obsolete
- As an alternative to the translate hoc you now can use the I18n component supporting a render props (for details about render props https://www.youtube.com/watch?v=BcVAq3YFiuc)
- 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 in childreact
like{ react: { wait: true } }
- you now can override all the default options for translate hoc by setting them on i18next.init (excluding
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'
}
});
- you now can override all defaults for translate hoc options (including
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
- add preact example
- Trans component parent element configurable PR278
- optimize generated defaultValue for components not having children
- move react, prop-types, ... to peerDependency again
- optimize trans component output
- fixes issue in changeLanguage on set via translate hoc ssr
- allow passing initialI18nStore and initialLanguage to I18nextProvider via props to support simpler ssr
- adds a serverside rendering sample based on razzle
- pass i18n instance to context inside translate hoc to simplify usage in nextjs
- options.react.exposeNamespace will expose namespace on data-i18next-options for consuming in editors
- introduces Trans component which enables you to translate nested components incl. interpolation by resulting in one translatable string. learn more
- allow passing down initialI18nStore and initialLanguage to translate hoc to support ssr scenario better see example/nextjs
- allow passing i18next instance in translate hoc options makes integration in nextjs easier
- Remove workaround to set ready if there was no initialized signal PR263
- Fix react-i18next to work with TypeScript PR261
- eslint cleanup
- a lot more tests
- flag nsMode: 'fallback' -> uses namespaces passed to translate hoc as fallbacks #254
- deploys 3.1.1 as possible breaking: fixes issue in fixing t function - pass only first namespace not an array of namespaces (access other namespaces like: this.props.t('namespace:key'))
- reverts last change
- fixes issue in fixing t function - pass only first namespace not an array of namespaces
- fixes wrong warning of missing prop on interpolate with format
- the wait flag on translate hoc can now be set globally on i18next options
i18next.init({ wait: true })
- [BREAKING] assert you install prop-types as a peerDependency based on changes in react >= 15.5.x
- update react to 15.5.x use prop-types module to remove react warnings PR248
- update all dependencies
- move react, prop-types to peerDependencies
- try not access store if undefined for hmr
- fixes validation for missing prop in interpolate component
- support formatting inside interpolate component
- tanslate hoc: expose the i18n instance via props
- translate hoc wait option asserts now that i18next is initialized before rendering (waits for lng detection)
- [BREAKING] needs i18next >= 4.2.0
- pass style prop to interpolate component
- define i18next as a peerDependency
- Suppresses required context type warning if passing i18n as a prop PR205
- allow passing i18next instance via props to translate hoc PR203
- adds options bindI18n, bindStore can be set to false or string of events to bind for triggering updates
- allows to set a className on interpolate component
- update all dependencies and devDependencies
- add option to change t function name to something else PR196
- Added an option of using the with a raw HTML PR195
- only trigger loaded namespaces if mounted
- update for react 15.2, eliminates Unknown Prop Warning
- Added conditional warning on unmatched variable during interpolation [PR 160](i18next#160
- Hoist non react statics [PR 150](i18next#150
- Handle i18next added and removed resource events [PR 150](i18next#150
- move ns loading to did mount
- possible fix for HRM issues
- adds wait option, which delays initial rendering until translations are loaded
- possible fix for HRM issues
- change global name
- adds getWrappedInstance() to translate wrapper
- Support for universal apps / server-side rendering PR 52
- fixes bower json - bower publish only
- change build to rollup
- added WrappedComponent property to translate wrapper PR 15
- fixing export of index
- change package.json main to
/lib/index.js
- move build from gulp to npm run script