1.0.15 • Published 2 years ago

@mentum-group/react-i18next v1.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

This is a fork of react-i18next. It modifies the Trans component to automatically detect text rendered by anything wrapped inside it and try to translate it. Importantly, it cannot detect text nested inside components, e.g.

const Foo = (props) => {
  return <Trans>
    <div>
      Baz
    </div>
    <Bar>
    </Bar>
  </Trans>
}

In the above example, anything rendered by Bar will not be translated, but anything rendered by Foo directly will, like the string Baz. To simplify this wrapping process, we add a function WithTrans, which adds the Trans component automatically. So this is equivalent to the above example:

const Foo = WithTrans((props) => {
  return <>
    <div>
      Baz
    </div>
    <Bar>
    </Bar>
  </>
})
1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.9

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.12

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago