8 |
{t('description.part1', { ns: 'ns1' })}
9 |
{t('description.part2', { ns: 'ns2' })}
10 |
11 | );
12 | }
13 |
14 | export default Comp2;
15 |
--------------------------------------------------------------------------------
/example/react-icu/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/example/react-icu/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family:
4 | -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell',
5 | 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
12 | }
13 |
--------------------------------------------------------------------------------
/example/react-typescript/simple/src/@types/i18next.d.ts:
--------------------------------------------------------------------------------
1 | import resources from './resources';
2 |
3 | declare module 'i18next' {
4 | interface CustomTypeOptions {
5 | resources: typeof resources;
6 | // if you see an error like: "Argument of type 'DefaultTFuncReturn' is not assignable to parameter of type xyz"
7 | // set returnNull to false (and also in the i18next init options)
8 | // returnNull: false;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/example/storybook/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/example/react-typescript/simple-multi-namespaces/src/App.tsx:
--------------------------------------------------------------------------------
1 | import './i18n/config';
2 | import Comp1 from './components/Comp1';
3 | import Comp2 from './components/Comp2';
4 | import Comp3 from './components/Comp3';
5 |
6 | function App() {
7 | return (
8 |