diff --git a/packages/react-i18n/CHANGELOG.md b/packages/react-i18n/CHANGELOG.md
index 24122e7..0b33cff 100644
--- a/packages/react-i18n/CHANGELOG.md
+++ b/packages/react-i18n/CHANGELOG.md
@@ -7,21 +7,12 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
**Note:** Version bump only for package @m6web/react-i18n
-
-
-
-
## [1.9.1](https://github.com/M6Web/i18n-tools/compare/@m6web/react-i18n@1.9.0...@m6web/react-i18n@1.9.1) (2021-03-09)
**Note:** Version bump only for package @m6web/react-i18n
-
-
-
-
# [1.9.0](https://github.com/M6Web/i18n-tools/compare/@m6web/react-i18n@1.9.0...@m6web/react-i18n@1.9.0) (2021-03-08)
-
### Bug Fixes
* **build:** fix build to make the lib importable ([97e59c5](https://github.com/M6Web/i18n-tools/commit/97e59c5232444c1ed46d07e676e8032a280e3209))
@@ -30,7 +21,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
* **react-i18n:** exports hook in index.js ([#18](https://github.com/M6Web/i18n-tools/issues/18)) ([c7c3fb8](https://github.com/M6Web/i18n-tools/commit/c7c3fb8434da037a43e39c4cbc0b061cd1fd1e15))
* **react-i18n:** remove unused contextType in component ([41d99e1](https://github.com/M6Web/i18n-tools/commit/41d99e17aa7d9692c795af2d373a258a54388178))
-
### Features
* **react-i18n:** add errorCallback for missing translations ([#54](https://github.com/M6Web/i18n-tools/issues/54)) ([56fac7d](https://github.com/M6Web/i18n-tools/commit/56fac7da38845b8aa4df4d20242b3db411607c9a))
diff --git a/packages/react-i18n/README.md b/packages/react-i18n/README.md
index 9cdbd81..1f335de 100644
--- a/packages/react-i18n/README.md
+++ b/packages/react-i18n/README.md
@@ -7,7 +7,6 @@


-
This library brings internationalisation through a set of react components.
The translation function is in **[i18n.utils.js](./src/utils/i18n.utils.js)** file.
@@ -57,6 +56,7 @@ const Root = () => (
## Use translation components
### i18n Provider
+
This component will provide the translation function to following components via the React.Context api.
* **lang**: translation dictionary
@@ -226,12 +226,15 @@ The variable used in translation template string has to be `%(number)d`, and is
To use general form, you need to set 4th parameter of the translate function to `true`
### HTML Interpolation
+
Basic html tags are automatically interpolated in translation if the syntax is correct (opening tag should be close within the translation).
Attributes are supported too.
Basic textual interpolations are proceeded first, and the HTML comes in a second time.
-- translation
+
+* translation
+
```json
{
"foo": {
@@ -239,7 +242,9 @@ Basic textual interpolations are proceeded first, and the HTML comes in a second
}
}
```
-- code
+
+* code
+
```jsx
import React from 'react';
import { useTranslate } from './useTranslate';
@@ -252,9 +257,11 @@ export const MyComponent = () => {
{t('foo.bar', { number: 2 })}
);
-}
+};
```
-- result
+
+* result
+
```jsx harmony
@@ -264,26 +271,31 @@ export const MyComponent = () => {
```
#### excluded elements
-For now `script` and `iframe` elements are ignored with all their children in the HTML tree.
+
+For now `script` and `iframe` elements are ignored with all their children in the HTML tree.
#### keys
+
In case of arrays of component, keys will be automatically generated to please React.
-- translation
+
+* translation
+
```js
{
foo: {
- bar:
- '
Test
' +
+ bar: '
Test
' +
'
This is not what we wanna do with this lib but we need to ensure it works anyway