Skip to content

v2.5.0

Compare
Choose a tag to compare
@cheton cheton released this 09 Jun 00:34
· 96 commits to master since this release

Adds support for react-i18next Trans' defaults (PR #83, 31c9e59, by @beheh)

react-i18n v7.7.0 introduced the defaults prop, see i18next/react-i18next#439 (comment).

The following code:

<Trans
  defaults="Hello <0>{val}</0>!"
  tOptions={{val: "World"}}
  components=[<strong>foo</strong>]
/>

will lead to the output:

{
  "Hello <0>{val}</0>!": "Hello <0>{val}</0>!"
}