Skip to content

Commit 84b8fd1

Browse files
ClarkkkkAaron_Zhou
and
Aaron_Zhou
authored
add descrption for defaultNS in i18nextprovider.md (#143)
Co-authored-by: Aaron_Zhou <[email protected]>
1 parent 95f3bc0 commit 84b8fd1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Diff for: latest/i18nextprovider.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ import { I18nextProvider } from 'react-i18next';
99
import i18n from './i18n';
1010
import App from './App';
1111

12-
<I18nextProvider i18n={i18n}>
12+
<I18nextProvider i18n={i18n} defaultNS={'translation'}>
1313
<App />
1414
</I18nextProvider>
1515
```
1616

1717
## When to use?
1818

19-
You will only need to use the provider if you need to support multiple i18next instances - eg. if you provide a component library ([like this example](https://github.com/i18next/react-i18next/tree/master/example/react-component-lib)) or in scenarios for [SSR (ServerSideRendering)](ssr.md).&#x20;
19+
You will need to use the provider if you need to support multiple i18next instances - eg. if you provide a component library ([like this example](https://github.com/i18next/react-i18next/tree/master/example/react-component-lib)) or in scenarios for [SSR (ServerSideRendering)](ssr.md). Additionally, you have the ability to manage the default namespace(s) by passing defaultNS.
2020

2121
## I18nextProvider props
2222

23-
| _**name**_ | **type (**_**default)**_ | _**description**_ |
24-
| ---------- | ------------------------ | ----------------------------------------------------------------------------------------- |
25-
| **i18n** | object (undefined) | pass i18next instance the provider will pass it down to translation components by context |
23+
| _**name**_ | **type (**_**default)**_ | _**description**_ |
24+
| ------------- | ------------------------------ | ----------------------------------------------------------------------------------------- |
25+
| **i18n** | object (undefined) | pass i18next instance the provider will pass it down to translation components by context |
26+
| **defaultNS** | string \| string[] (undefined) | pass defaultNS to manage the default namespace(s) |

0 commit comments

Comments
 (0)