{"_id":"i18next-react","_rev":"4-846de83adfe2b840477658a3b7c8c1b8","name":"i18next-react","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"i18next-react","version":"0.1.0","author":{"name":"Wang Guan","email":"momocraft@gmail.com"},"description":"A tiny React binding for i18next","repository":{"type":"git","url":"git+https://github.com/jokester/i18next-react.git"},"bugs":{"url":"https://github.com/jokester/i18next-react/issues"},"license":"MIT","scripts":{"build":"rm -rf dist && tsc --project tsconfig.json","test":"CI=true react-scripts test","test:watch":"react-scripts test --watch","test:coverage":"CI=true react-scripts test --env=jsdom --coverage --watchAll=false --coverageReporters=json --coverageReporters=lcov --coverageReporters=text --coverageReporters=html","typecheck":"tsc --noEmit","typecheck:watch":"tsc --watch --noEmit","lint":"    eslint 'src/**/*.@(ts|js|tsx|jsx)'","lint:fix":"eslint 'src/**/*.@(ts|js|tsx|jsx)' --fix"},"peerDependencies":{"i18next":"*","react":">=16.7"},"devDependencies":{"@types/jest":"^25","@types/node":"^12","@types/react":"^16.9.35","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^2.32.0","@typescript-eslint/parser":"^2.32.0","eslint":"7.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","eslint-plugin-react":"^7.19.0","eslint-plugin-react-hooks":"^4.0.0","i18next":"^19.4.5","jest":"^25","prettier":"^2.0.5","ts-jest":"^25","typescript":"^3.8"},"gitHead":"f27fc5f9dcab4ee9eb03f7ad4e02ef9fc613d424","homepage":"https://github.com/jokester/i18next-react#readme","_id":"i18next-react@0.1.0","_nodeVersion":"10.20.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-NP/4TrSIhY8ij4qK/5t0kogzHJp2qi04e/WCcff/XdN8ithryCeZvclzdA5Tp4RmDFUDyOarZm0Wsj1E3nd6PA==","shasum":"4aa602ecf7c9bd9027bcd2993aab64f8f716a9d7","tarball":"https://registry.npmjs.org/i18next-react/-/i18next-react-0.1.0.tgz","fileCount":9,"unpackedSize":11124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1MdFCRA9TVsSAnZWagAAbR4P/2YrfrhKq4PQR4rm+arF\nFbSpOb6OFncNb5tZByPt59xt1JnnfW8cmGybJAVELn1K688LIMK9578ynCJA\ngjuZBQ5En3uc4gn1nuPuZOHVE48Ex5WaFapBji2GtLtf7tTAhZkUXs8sqPlC\nsfAFWqGtQcx4ZziI0fhsVmB4SZRyCp85iHsOrkvf+LP4lS/1L4GbGPJ9Erbd\nqmk9dQShGspXnwTDamkG8vMvSCzneFng1ChDJrL3zk0pFNafjqQ1jfgNLl16\nGyqzx7TUm+kveehVflhhf45QuZQyzUMSaVv/qzy47/ffmudkgIq2txRembiD\nhdl/jhe0GEv+0GrP5DHNTDeebz9rXlytpBJVR0zNM44J3iz4zf0qWa5iso/J\n5AvSTFfSHHi0Xu+3VBNkxeLIM2GXhICQ8raYO+UEECNpqOEfBfneOSUoJG1a\nFxpbu2V0VVKLz4T17lMMAcMSjMG8Hiw3zIXBnxNK98uPMNab/ewoXCptmHAm\ncJnINF3BZCAlt/MhqOsOwLsI3uYS7RfE3bEHCBd0RDhyB5nsX8eEJy84aNFp\nrFl/dLsZX8YjOheaNaiy3Xf92wttsuRqKfsEjVdezj6kstd3ZVo5qujEVkQ8\nyAsJTUp8/CVaWmAk+gDHGhsgN4PGji2UZosfY2AtbCmOiz8VLWPqykdVXsIt\nTxqt\r\n=BWg2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBsLtt4rtT6ONTHnjOFVd2RcJ3awe0CoFsOEjLkucP7BAiBM+dIqRBIdrmaMg2Bh/eAoC9ocnQ5n9sPY6HvIrX31ng=="}]},"maintainers":[{"name":"jokester","email":"momocraft@gmail.com"}],"_npmUser":{"name":"jokester","email":"momocraft@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18next-react_0.1.0_1591002949474_0.8080937153732273"},"_hasShrinkwrap":false},"0.1.1":{"name":"i18next-react","version":"0.1.1","author":{"name":"Wang Guan","email":"momocraft@gmail.com"},"description":"A tiny React binding for i18next","repository":{"type":"git","url":"git+https://github.com/jokester/i18next-react.git"},"bugs":{"url":"https://github.com/jokester/i18next-react/issues"},"license":"MIT","scripts":{"build":"rm -rf dist && tsc --project tsconfig.json","test":"CI=true react-scripts test","test:watch":"react-scripts test --watch","test:coverage":"CI=true react-scripts test --env=jsdom --coverage --watchAll=false --coverageReporters=json --coverageReporters=lcov --coverageReporters=text --coverageReporters=html","typecheck":"tsc --noEmit","typecheck:watch":"tsc --watch --noEmit","lint":"    eslint 'src/**/*.@(ts|js|tsx|jsx)'","lint:fix":"eslint 'src/**/*.@(ts|js|tsx|jsx)' --fix"},"peerDependencies":{"i18next":"*","react":">=16.7"},"devDependencies":{"@types/jest":"^25","@types/node":"^12","@types/react":"^16.9.35","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^2.32.0","@typescript-eslint/parser":"^2.32.0","eslint":"7.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","eslint-plugin-react":"^7.19.0","eslint-plugin-react-hooks":"^4.0.0","i18next":"^19.4.5","jest":"^25","prettier":"^2.0.5","ts-jest":"^25","typescript":"^3.8"},"gitHead":"2d07b804d70f7184d3507ccf3b391f511e79d8f3","homepage":"https://github.com/jokester/i18next-react#readme","_id":"i18next-react@0.1.1","_nodeVersion":"10.20.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-6tbTQfCtkZD5x26oKToixSmETY4b+0HnT4BEFfEjuu1dFdBVIB4gogwmc+HDh+0NGo11QMrkIiwP63CBJJ+KSw==","shasum":"43df51763d6088302f0bff8d04e5c47f832358f8","tarball":"https://registry.npmjs.org/i18next-react/-/i18next-react-0.1.1.tgz","fileCount":9,"unpackedSize":11245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1MsgCRA9TVsSAnZWagAAdpoQAKTtXph2mW73see+DUjm\nFxF1M2tWBNM5qz+MKibi5mBxhE8uMAI16Imm/4xpxdxFhLoazLOWxpcbhNvB\nv6wzdotOwkS80QedqL0HeeLxGRNTXgZSG75lGLOO+tmtbjUcCqOFLqFjlyej\nqdohQzDnWEVpkphnSFLRlcJL8F0cph0iYwDla488qpnxJkpBir18jTx34U9S\nB5JhJcckxq0LrFhVUmPKs6U/X+dYSDM0WfQDP7+BcLxfnCcC8LxvDwimHZMJ\nppLmjKsajIdCGG5s3G9cZviP9prhbs/DShjKOY2ty1KFQA+sCCut4J8vp0gL\n+qYJU/LlYaXCUpkrYqmuPxPl07N37y+Y97X06kJE9H487M/Ehf8EMN1v1i1s\nk5AwgdO+vGJ0vQUOuvTHn2rVTu4jtS7yImGgphu79ZkNRH7uesCo+rJseHmR\npcJh7cF36rBKpGwi0Eqf+fLUZmbSRfoJaB4KhqNarxXigSF8NkIdaCrzb0nr\nMqJLAjSIOjuSiWYTZ7JRYy1/7jig7TvYjjH15mj/rc5MSsVcZ9XNyB4UMYsp\nri4gKxcrnOduM3wImjoBLz0inHVxRGo0CM37liVVrEhwlMY6MmX6jOAHCS4q\nyRrBpsqkM5fGBbgEYxrbe4W08V3hKR7rlBPa55vQU0AmT9Et/NlcgoRDC/tw\nPI9d\r\n=tz2X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICTnfst93a5MOVzuFkA03McMOHOeQa2EXok5wHZ5oNMnAiAxL83ctyW0ty0qVjDHcFzb+c0LWUWgXS8XO0o+UM3Bsw=="}]},"maintainers":[{"name":"jokester","email":"momocraft@gmail.com"}],"_npmUser":{"name":"jokester","email":"momocraft@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18next-react_0.1.1_1591003935995_0.26161120920746317"},"_hasShrinkwrap":false},"0.2.0":{"name":"i18next-react","version":"0.2.0","author":{"name":"Wang Guan","email":"momocraft@gmail.com"},"description":"A tiny React binding for i18next","repository":{"type":"git","url":"git+https://github.com/jokester/i18next-react.git"},"bugs":{"url":"https://github.com/jokester/i18next-react/issues"},"license":"MIT","scripts":{"build":"rm -rf dist && tsc --project tsconfig.json","test":"CI=true react-scripts test","test:watch":"react-scripts test --watch","test:coverage":"CI=true react-scripts test --env=jsdom --coverage --watchAll=false --coverageReporters=json --coverageReporters=lcov --coverageReporters=text --coverageReporters=html","typecheck":"tsc --noEmit","typecheck:watch":"tsc --watch --noEmit","prepublish":"yarn build","lint":"    eslint 'src/**/*.@(ts|js|tsx|jsx)'","lint:fix":"eslint 'src/**/*.@(ts|js|tsx|jsx)' --fix"},"peerDependencies":{"i18next":"*","react":">=16.7"},"devDependencies":{"@types/jest":"^25","@types/node":"^12","@types/react":"^16.9.35","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^2.32.0","@typescript-eslint/parser":"^2.32.0","eslint":"7.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","eslint-plugin-react":"^7.19.0","eslint-plugin-react-hooks":"^4.0.0","i18next":"^19.4.5","jest":"^25","prettier":"^2.0.5","ts-jest":"^25","typescript":"^3.8"},"gitHead":"c6362b8a704da71b4b6441a61c18ee70e0084ed6","homepage":"https://github.com/jokester/i18next-react#readme","_id":"i18next-react@0.2.0","_nodeVersion":"10.20.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-YMOhIXlfSCanSXgpboN/gH/n5UGiXJv93Q/9TvzpIpsc8/ZwPwL1mxOBegmCNdq0DE/KtcW3K5MWKafagiAv2g==","shasum":"4ba38ff747bf221519d77af34f7ba0c3851db8b9","tarball":"https://registry.npmjs.org/i18next-react/-/i18next-react-0.2.0.tgz","fileCount":9,"unpackedSize":11371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1M41CRA9TVsSAnZWagAALzwP/2R8uNQKOwY3uDAlTQ4v\nU78b/kH4HbOdh1y1RRRMsc+pYVwu2ewqeAKB/UP6FcVywtST8CPY2iBTK4Lt\ngBhdsv5YyS7eQN31ogY61mmbYqWbltaAoy1pF01oL0RqoZD+SdX4Suf7HbmC\n0/aamYKepxbkdbiDtFG36P0HEFDDfjpzO2qmfpNiENRca1mkHML4ObTjCW+l\nmI8+niwkprNELp5d6co2tpAzhzUw9Iq8hzVZL8pfcaeQ47Gt/DTyZPRi3Tvs\nnczZrJL3q4hIEoIy8GPb3betXUUiqkWRc00gGzFjd5wdok6KixV73XAvqIjN\nePlHwthGAfyT2jBgtJu1EDGwYcQ9HC+bH/5N5JbWhBxAgPm3//gC+BbjFfdn\n2Pk9FwHWB+vMZdHUWookzx5kARy4dXTnkQz80dIWm9jgRiSY+7fW+ht2eAUJ\ntVFNGn2e+WwV0CpbfqeGumNu/qjb0TTSe0LPnB5aIuHNA07IVs+05H51Dl8u\n8m5FVIe1i/vwh7Vpp5xNkl3u18w6253XwS85wzP4YGz8y44aaaJQTREV+SFM\nAqlUPuGLZbSQxrW/lxd81waa78HYK0WkOzn7OuMhCbE24/nASlLhsbNr3H9h\nSQ59RibkOmViDuaDt65RtnwyV0zm570j47wX/bY8pzNLMrD3BW96B7N7Ybim\nLeV1\r\n=Wamp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCu+YvqpFQKz2xuyZDIPzXS9orDq16rRNV1Aa2op4XORgIhAPh/o7aciItQ5dPG1r/7/UZaaBJBqpgMIXQc5zdELcim"}]},"maintainers":[{"name":"jokester","email":"momocraft@gmail.com"}],"_npmUser":{"name":"jokester","email":"momocraft@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18next-react_0.2.0_1591004724883_0.866956080782006"},"_hasShrinkwrap":false},"0.2.2":{"name":"i18next-react","version":"0.2.2","author":{"name":"Wang Guan","email":"momocraft@gmail.com"},"description":"A tiny React binding for i18next","keywords":["react","i18n","i18next","next.js"],"repository":{"type":"git","url":"git+https://github.com/jokester/i18next-react.git"},"bugs":{"url":"https://github.com/jokester/i18next-react/issues"},"license":"MIT","scripts":{"build":"rm -rf dist && tsc --project tsconfig.json && tsc --project tsconfig.cjs.json","test":"CI=true react-scripts test","test:watch":"react-scripts test --watch","test:coverage":"CI=true react-scripts test --env=jsdom --coverage --watchAll=false --coverageReporters=json --coverageReporters=lcov --coverageReporters=text --coverageReporters=html","typecheck":"tsc --noEmit","typecheck:watch":"tsc --watch --noEmit","prepublish":"yarn build","lint":"    eslint 'src/**/*.@(ts|js|tsx|jsx)'","lint:fix":"eslint 'src/**/*.@(ts|js|tsx|jsx)' --fix"},"peerDependencies":{"i18next":"*","react":">=16.7"},"main":"./dist/cjs/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@types/jest":"^25","@types/node":"^12","@types/react":"^16.9.35","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^2.32.0","@typescript-eslint/parser":"^2.32.0","eslint":"7.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.3","eslint-plugin-react":"^7.19.0","eslint-plugin-react-hooks":"^4.0.0","i18next":"^19.4.5","jest":"^25","prettier":"^2.0.5","ts-jest":"^25","typescript":"^3.8"},"gitHead":"42906175a81441fd7ccb19a56c1dcc491a916518","homepage":"https://github.com/jokester/i18next-react#readme","_id":"i18next-react@0.2.2","_nodeVersion":"10.20.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-SptXIs0hVIFPis2s0797HbBJpze6ST2I02Wm3uSyMdSg5XPHW14eJVshdCfbGzgIDPKF7nrl6htbkDjYEd+HIA==","shasum":"07f1417ea2c08de3203b62ad8d29283fa720df90","tarball":"https://registry.npmjs.org/i18next-react/-/i18next-react-0.2.2.tgz","fileCount":15,"unpackedSize":18640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1NYjCRA9TVsSAnZWagAARPQP/1y3J6ArqcSVwIf1Bnl5\noMW7Y8a/PRdyQZDRKd990HVLEThhI8TJU3biWbEICEMSv+ZYsnGYBqU5oRDD\nDxVdRZUvC/97SlQiogatIVIofQvGhQ1xWP/dIr36DteQQMLSvFznNVKjgo3e\naKRR/Ae+930YGu0j8DTH9lIbpbupSBHqCgRmLcpnSZeUL78uaJQQkgADm1Go\nMX1i19QpaWzuW4V4pNh+v1JXK5GPFW83QxNJKmYioQxG9YQIvX//a36O0/JD\n3KFwlKvd5idWRvckKWl/UVVCgylnfz/bRKDMOiItFzLwP77/JdnXjJSXiESk\n/QaQDUcGvPSo+JKrqAnKAiAGY7EJoMXXXrUXLSV3yilU76R2KH4+3OmrfCNB\nwkclZQ2h3wMlGcAXKg8aixFCFCeZUY/A1WCNXmHINgTAQ6uHw2xTcUir4r60\ng7Bn58TI2kgEcz+u9MXCQlMbIfYqLc3CIYqtAHpJYxcmas0mp3DiYru+iNGX\nqLk43bMkD1r0Fw+jEZKw2TsZ8wU/I9+nzoZEgo553oTR1H3F+MgcP3tEF9+4\nQtb7GOcgTEXFW5hHY3gzFA1WQTq/D/lZQ58R3iGED2lL/wvQXrc8XkEFZYo6\nw4m4gvT1BjiiQSZRkW/Eh1fTlvovIiZUSuhkP0TmFMJE7DCm+gOYI7ulOlaw\nNayC\r\n=IA32\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7OyEoJNdBOziWVEchKyXMNfzrpQPxkmHQRDuJGHFXpgIgZ6Hw54biJ7FRf+vKxIDK7nz8vT8a5LXO28V1H6doz/c="}]},"maintainers":[{"name":"jokester","email":"momocraft@gmail.com"}],"_npmUser":{"name":"jokester","email":"momocraft@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/i18next-react_0.2.2_1591006754975_0.13656908222480757"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-01T09:15:49.473Z","0.1.0":"2020-06-01T09:15:49.678Z","modified":"2022-05-05T13:36:14.408Z","0.1.1":"2020-06-01T09:32:16.168Z","0.2.0":"2020-06-01T09:45:25.149Z","0.2.2":"2020-06-01T10:19:15.088Z"},"maintainers":[{"name":"jokester","email":"momocraft@gmail.com"}],"description":"A tiny React binding for i18next","homepage":"https://github.com/jokester/i18next-react#readme","repository":{"type":"git","url":"git+https://github.com/jokester/i18next-react.git"},"author":{"name":"Wang Guan","email":"momocraft@gmail.com"},"bugs":{"url":"https://github.com/jokester/i18next-react/issues"},"license":"MIT","readme":"i18next-react\n-------\n\nA tiny (~130LOC) React binding for [i18next](https://github.com/i18next/i18next).\n\n[![npm version](https://badge.fury.io/js/i18next-react.svg)](https://badge.fury.io/js/i18next-react)\n\n## Features\n\n- Simple\n    - actually, the only dependencies are `react` and `i18next`\n\n- Framework / configuration agnostic\n    - opinionless about other parts of system, including how to load i18n resources / how to infer and persist locales\n    - easier to integrate into an existing app, or opt out\n\n## Comparison with alternatives\n\nThis library is initially made when trying to use `i18next` in a Next.js serverless app.\n\nBefore rolling yet another binding, I tried these libraries:\n\n- [isaachinman/next-i18next](https://github.com/isaachinman/next-i18next) has impressively rich features. But it requires some certain app structure, a custom server, and a few middlewares, all of which I had difficulties to comply with.\n- [i18next/react-i18next](https://github.com/i18next/react-i18next) was not very simple to use in Next.js SSR.\n\n## Getting started\n\n1. Install: `npm install --save i18next-react` or `yarn add i18next-react`\n2. Define a factory function to provide initialized `i18next` instance\n3. Wrap top level component (or, a component where you want to use i18next within) with `<I18NextReactProvider lang={initialLang} factory={i18NextFactory}>`\n4. Consume `i18next` API with`useI18n()` or `useI18nLoaded(lang, namespace)` hooks\n\n## Examples\n\n[react-simple](examples/react-simple):\n\n- based on CRA react app\n- bundles in en locale\n- load zhHans / zhHant / ja locales on demand, with [i18next/i18next-http-backend](https://github.com/i18next/i18next-http-backend)\n\n[nextjs-ssr](#)\n\n- TODO\n\n## Feedback / Issues / Contributions\n\nIf you find anything interesting, feel free to [fill an issue](https://github.com/jokester/i18next-react/issues/new).\n\nAlso, I haven't tested but this should be compatible with preact / react-native too. Like to hear if this library works (or doesn't) with them.\n\n## License\n\nMIT\n","readmeFilename":"README.md","keywords":["react","i18n","i18next","next.js"]}