{"_id":"@borodutch-labs/localize-react","_rev":"6-0c431e0c50a45d9d7e313838b206819b","name":"@borodutch-labs/localize-react","dist-tags":{"latest":"1.7.6"},"versions":{"1.7.2":{"name":"@borodutch-labs/localize-react","version":"1.7.2","description":"React Localization Library","main":"dist/localize-react.js","repository":{"type":"git","url":"git@github.com:yankouskia/localize-react.git"},"author":{"name":"yankouskia","email":"aleksandr.yankovskiy@gmail.com"},"license":"MIT","peerDependencies":{"react":">=16.8.0"},"devDependencies":{"@babel/core":"^7.16.0","@babel/plugin-transform-object-assign":"^7.16.0","@babel/preset-env":"^7.16.0","@babel/preset-react":"^7.16.0","babel-jest":"^27.3.1","babel-loader":"^8.2.3","codecov":"^3.8.3","jest":"^27.3.1","np":"^7.5.0","react":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.60.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.2"},"scripts":{"build":"NODE_ENV=production rollup -c","test":"jest","coverage":"jest --coverage","codecov":"codecov -t 8365e97e-7298-4a00-ad32-740d44db89e5 -f coverage/*.json"},"types":"./index.d.ts","licenseText":"MIT License\n\nCopyright (c) 2019 Aliaksandr Yankouski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@borodutch-labs/localize-react@1.7.2","dist":{"shasum":"774bc83bfa0b2661a0018789d9cb4c4f90129396","integrity":"sha512-ySCM5ZdW3WVRIGNhaF5682jC3bgJOJRnYqKEoZ0ldiQQmStFs761UrZRPlDGZM8RVUpNCkH/Iun9GR/Ejj/qfw==","tarball":"https://registry.npmjs.org/@borodutch-labs/localize-react/-/localize-react-1.7.2.tgz","fileCount":9,"unpackedSize":13994,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcQ2L3JSPYhj0HUSQa3+VPNeqTe4Oysiu02O/myoemSwIhAPTstFH5Z+ggTpVhbqRhkkdcJUyxwws20PtcJer0/+xQ"}]},"_npmUser":{"name":"borodutch","email":"nikita@borodutch.com"},"directories":{},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/localize-react_1.7.2_1636903765579_0.8811482789035263"},"_hasShrinkwrap":false},"1.7.3":{"name":"@borodutch-labs/localize-react","version":"1.7.3","description":"React Localization Library","main":"dist/localize-react.js","repository":{"type":"git","url":"git@github.com:yankouskia/localize-react.git"},"author":{"name":"yankouskia","email":"aleksandr.yankovskiy@gmail.com"},"license":"MIT","peerDependencies":{"react":">=16.8.0"},"devDependencies":{"@babel/core":"^7.16.0","@babel/plugin-transform-object-assign":"^7.16.0","@babel/preset-env":"^7.16.0","@babel/preset-react":"^7.16.0","babel-jest":"^27.3.1","babel-loader":"^8.2.3","codecov":"^3.8.3","jest":"^27.3.1","np":"^7.5.0","react":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.60.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.2"},"scripts":{"build":"NODE_ENV=production rollup -c","test":"jest","coverage":"jest --coverage","codecov":"codecov -t 8365e97e-7298-4a00-ad32-740d44db89e5 -f coverage/*.json"},"types":"./index.d.ts","licenseText":"MIT License\n\nCopyright (c) 2019 Aliaksandr Yankouski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@borodutch-labs/localize-react@1.7.3","dist":{"shasum":"06cff228d39a272aa4ee06454e2f75284c600069","integrity":"sha512-WdrIzIZCT2IvqhR19zO9DglZIwIpxcxGbrNxw09Jm8LHiZVNKDGnxeQ/U78l7KSvJ0fUicOw4+tkvLsgC7wB9g==","tarball":"https://registry.npmjs.org/@borodutch-labs/localize-react/-/localize-react-1.7.3.tgz","fileCount":9,"unpackedSize":13994,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZ4yVCqymV0V2q06PltfJpcM29R5lCfmmoc0v74A01rQIgFOCauuD0qM5+dhPEt6jEYJV9UUndgELrbpNVbcTO7yE="}]},"_npmUser":{"name":"borodutch","email":"nikita@borodutch.com"},"directories":{},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/localize-react_1.7.3_1636903914232_0.9281346663816967"},"_hasShrinkwrap":false},"1.7.4":{"name":"@borodutch-labs/localize-react","version":"1.7.4","description":"React Localization Library","main":"dist/localize-react.js","repository":{"type":"git","url":"git@github.com:yankouskia/localize-react.git"},"author":{"name":"yankouskia","email":"aleksandr.yankovskiy@gmail.com"},"license":"MIT","peerDependencies":{"react":">=16.8.0"},"devDependencies":{"@babel/core":"^7.16.0","@babel/plugin-transform-object-assign":"^7.16.0","@babel/preset-env":"^7.16.0","@babel/preset-react":"^7.16.0","babel-jest":"^27.3.1","babel-loader":"^8.2.3","codecov":"^3.8.3","jest":"^27.3.1","np":"^7.5.0","react":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.60.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.2"},"scripts":{"build":"NODE_ENV=production rollup -c","test":"jest","coverage":"jest --coverage","codecov":"codecov -t 8365e97e-7298-4a00-ad32-740d44db89e5 -f coverage/*.json"},"types":"./index.d.ts","licenseText":"MIT License\n\nCopyright (c) 2019 Aliaksandr Yankouski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@borodutch-labs/localize-react@1.7.4","dist":{"shasum":"6ee624fb9a0f1d288fb9883949f8e2f5c31f92a5","integrity":"sha512-AXfELXO579pVNKekACqqvBTs+0etEZ9nXqvb5RKANaw6s2YvCDrsPvxlI952w1H0jik1PBTZsf+i1WV4SHhVzQ==","tarball":"https://registry.npmjs.org/@borodutch-labs/localize-react/-/localize-react-1.7.4.tgz","fileCount":9,"unpackedSize":13994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzZkNCRA9TVsSAnZWagAAIs4QAI4cjfCQES20+hNFrFiW\nFT4pQwsiXT0bKWEekaHTEaIal2GZojlsdEcxdJp3hyjVY+G5h0DCr6fpITq/\nK+wxapZ15X1GFfQFL8p6vw2D9XPT75ZnTaLqPOhRxcdKObwWVlAX5QXF4pJ+\nIPw7YkPAvjSkylfJyr8ONGA0NMVjwIGLL0b/yP5jWMR8RSlwd2QtmmDfFxvy\n15CFUOTZAXIMrVb/yegSavOMbKb75CSR7FzybkZ515OMcJLJPdKxivdmGcYy\nvWOi9s/iLxVOFN4+l/UxoA19ZQFQ5RTvdCweUfPsZ6fTx/PxWmniXaMgmgc6\n4Kw8u2PCfg1ShBTh3M39rMBF7+aASIQQd/JG0rINcF+1JMOu3VgjnbnuxTI3\njuVhoBIJISQ8+y0c9SL114SaKIj/Ev3pGbIVRNizSkwH0pAJDOfzTLtLFt2d\nwMuH+i3Y+Hk5I31f9NVhNqlO+xkg0jf9zhxfkBhijHZyOvg1l7EZ/IR64pWA\nlXLXie8mnmLd1yCFd5rc3gcblSZNnZ572UEAkVLvRa3cZspKjXp0fJAdI+Bs\nNMYT0AIlxuEsnlsM+nT98z0MtE/3wh2zIHiQscT1YoGEcKA2D44KK2N3Fgg2\ntnwfLwYLCdomtIYNCAbtZaRGV69EOFf5dEQvgXemCqt0I/RmqIcU4Ep1AQdF\ntIwM\r\n=nM86\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpYrkjdGouDf7J9ySiFuWNYgysx53evDIZiEO6MDNE2gIhALxVpW+565WNJZ+F5rHUwMRJRFBLxLVKBKOXCdGZ6RtJ"}]},"_npmUser":{"name":"borodutch","email":"nikita@borodutch.com"},"directories":{},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/localize-react_1.7.4_1636904168866_0.9045905012309443"},"_hasShrinkwrap":false},"1.7.5":{"name":"@borodutch-labs/localize-react","version":"1.7.5","description":"React Localization Library","main":"dist/localize-react.js","repository":{"type":"git","url":"git+ssh://git@github.com/yankouskia/localize-react.git"},"author":{"name":"yankouskia","email":"aleksandr.yankovskiy@gmail.com"},"license":"MIT","peerDependencies":{"react":">=16.8.0"},"devDependencies":{"@babel/core":"^7.16.0","@babel/plugin-transform-object-assign":"^7.16.0","@babel/preset-env":"^7.16.0","@babel/preset-react":"^7.16.0","babel-jest":"^27.3.1","babel-loader":"^8.2.3","codecov":"^3.8.3","jest":"^27.3.1","np":"^7.5.0","react":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.60.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.2"},"scripts":{"build":"NODE_ENV=production rollup -c","test":"jest","coverage":"jest --coverage","codecov":"codecov -t 8365e97e-7298-4a00-ad32-740d44db89e5 -f coverage/*.json"},"types":"./index.d.ts","gitHead":"77e223e7a2d8ce5b1cb5e150286de76e12949912","bugs":{"url":"https://github.com/yankouskia/localize-react/issues"},"homepage":"https://github.com/yankouskia/localize-react#readme","_id":"@borodutch-labs/localize-react@1.7.5","_nodeVersion":"17.3.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-Rgq48Rlw2QdTPz1tXkTPT/rx8sENMbYzTaclR1vDmyhfyHIrSMZYDBNdLA4IAzNrlGTOoqWuyM31h0n0v9Kbow==","shasum":"2f0224828a3d609fbdcae1936894e05c170948db","tarball":"https://registry.npmjs.org/@borodutch-labs/localize-react/-/localize-react-1.7.5.tgz","fileCount":7,"unpackedSize":14011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6qkRCRA9TVsSAnZWagAAlZUP/i7CmG+kOHeTnWxOn6tR\npeRDYG7g6S/rYYDABWBO5o81qdxRIeCEklKsjMfj4a7rQhn7JW8/ZKwFEwpQ\nSLEpzO5LMVC05VlZIhl6j6XsLyo2uB9jYsuuNakiCnnVr/ZKTuEZfJYSHkw0\nHMrQdIC+VyorWOjRPfxCteFU8jaLsbx2s+ruDf0UQAbmJkDz3IBHHcBcA570\nFQ3ZCiP6VBb0C1hQgM2JkmMieLwINvR5ahw+XPF7U/An4zSb3SEhOBJfTDMg\nqc24ffyR5Hp2xjGQGZcInakJw4JqyXVCivanAXnUA4BtFsnqdV33HK8PagLW\nnxf/gGe1yj+AAyUuVE45Ra0333MN748vZ/fNXPkGfUY7hJ5IyIAO+/ctkEeX\nIAvz4R+VWG69NINsM//vL9hoMzfNCtvLplM9nZwQihVlewWH3lVpvRXuFJSB\n5ktoM6h8TnnWlB71azmLDQWPz2EiQvCWpavHS0aXQdTfBEBBCoFANJ/H18s9\ndN7mCgBfi1QmAA/cdPEwcLt46kx43AfjHUP3WC3pstzW0SUITgn8gWR31ipj\ngBZY3lKAcGywEiX9dQ/BavqdJ6JpOVB/A3lVzLseB54r7j8siRPWEzWMmoBL\n6iiu985vEF6iSgMPs2KXcAKoPBQEBanISEAYcoq8yCQTA0pjVJUDOV92ZEmO\nOhk/\r\n=Mp+Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBhooETdJka53bPIvuG8Qi/vcrhIDHOaK3QkjY/EYX58AiAxwJE1Tfqc6iXAys2GyNEN8khqL0Kn0epsMpN7s9qIwA=="}]},"_npmUser":{"name":"upacyxou","email":"upacyxou@gmail.com"},"directories":{},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/localize-react_1.7.5_1642768657284_0.24259265595588553"},"_hasShrinkwrap":false},"1.7.6":{"name":"@borodutch-labs/localize-react","version":"1.7.6","description":"React Localization Library","main":"dist/localize-react.js","repository":{"type":"git","url":"git+ssh://git@github.com/yankouskia/localize-react.git"},"author":{"name":"yankouskia","email":"aleksandr.yankovskiy@gmail.com"},"license":"MIT","peerDependencies":{"react":">=16.8.0"},"devDependencies":{"@babel/core":"^7.16.0","@babel/plugin-transform-object-assign":"^7.16.0","@babel/preset-env":"^7.16.0","@babel/preset-react":"^7.16.0","babel-jest":"^27.3.1","babel-loader":"^8.2.3","codecov":"^3.8.3","jest":"^27.3.1","np":"^7.5.0","react":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.60.0","rollup-plugin-auto-external":"^2.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.2"},"scripts":{"build":"NODE_ENV=production rollup -c","test":"jest","coverage":"jest --coverage","codecov":"codecov -t 8365e97e-7298-4a00-ad32-740d44db89e5 -f coverage/*.json"},"types":"./index.d.ts","gitHead":"53d150c6d42544e4fb4456bbb1215267357680be","bugs":{"url":"https://github.com/yankouskia/localize-react/issues"},"homepage":"https://github.com/yankouskia/localize-react#readme","_id":"@borodutch-labs/localize-react@1.7.6","_nodeVersion":"17.3.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-kq5OoSsc2SBlKdaBqM4zeiS1JCT/OYAWMJD5nJBg+3wOJxlEevPBApTCUzGndvOXZTWg/p0HVj+Qjgc0nN9SRA==","shasum":"8e3fe2905c6d0f8c0d48cec1a61d264eb0bb6035","tarball":"https://registry.npmjs.org/@borodutch-labs/localize-react/-/localize-react-1.7.6.tgz","fileCount":7,"unpackedSize":14022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6qrJCRA9TVsSAnZWagAAORIQAIQ/QaKJea4Fy962q7qq\no7yXZ1ictAd62b9hcr9klDwPsRosCmqQXPt1JgPNbEWyNVpNhOmmNG51eB/s\nAXx50mPcsGFTTSQ1qegPJ6wy1dO5WJNJzlX+W8thJx3ULcwLe4E9A+uOu+rh\nYBsIujsf0Njretc1rIJkBW+4tRC3F/qdXKf0Ihqmcg3FGGZqsDwQdaABcBSz\nMLJJmbEXs1JZPwy5A/MbjEAwAdO1hSmTmwtLft3yT8+MkLoOsnebkYYkuh7M\n1nQVCNPrhtaSq3xTqwHyK73djSxo9KiFznXgmCj5h6rLqxT0gS+1F1Gbr3kS\nWO08sTGhuGvFKBiCSfg0MX/Gocv3cNNH7qNBVIyC3lwM8XNLAdorl7Mmbkrz\nyFSewWAF/SRgwcXI4x1xsje4X6PhvSXt/YBwze0HDjeIzhrIRagIv6BDSwZz\newvM2DN9PIjqqYZ3ghOMAfh4TQcFKKUm+xIttW6rhk84dbldy04pXTPD9BZa\niDjODv+zsbRP4oB/gFjaKoNJ3HczcneGeb6tKckmwRaPNF55VdK4Kds7lyxs\nwdV82XBpNf106GsLB23hJ6X+j+QjnCWeQ4i/J8tJjskwexVEF/kWhUFK3UoA\nPc3Zd7zOZ90cVQzoDxMBtruK2bqD1MK0xE+GhdNGgMV+gicVob//quJmtDxz\nqHS6\r\n=789F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCacfpcGBPM46PU7AarUZsnWM4NHzyn/25nEvySYz0vjQIhAOceVvkvu2W1aHoYJT5PxUhJibPnANwc9O0d/VJlQjVw"}]},"_npmUser":{"name":"upacyxou","email":"upacyxou@gmail.com"},"directories":{},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/localize-react_1.7.6_1642769097692_0.3282033170820766"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-14T15:29:25.528Z","1.7.2":"2021-11-14T15:29:25.793Z","modified":"2022-04-04T20:13:12.606Z","1.7.3":"2021-11-14T15:31:54.358Z","1.7.4":"2021-11-14T15:36:09.002Z","1.7.5":"2022-01-21T12:37:37.428Z","1.7.6":"2022-01-21T12:44:57.859Z"},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"description":"React Localization Library","repository":{"type":"git","url":"git+ssh://git@github.com/yankouskia/localize-react.git"},"author":{"name":"yankouskia","email":"aleksandr.yankovskiy@gmail.com"},"license":"MIT","readme":"[![CircleCI](https://circleci.com/gh/yankouskia/localize-react.svg?style=shield)](https://circleci.com/gh/yankouskia/localize-react) [![Codecov Coverage](https://img.shields.io/codecov/c/github/yankouskia/localize-react/master.svg?style=flat-square)](https://codecov.io/gh/yankouskia/localize-react/) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/yankouskia/localize-react/pulls) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/yankouskia/localize-react/blob/master/LICENSE) ![GitHub stars](https://img.shields.io/github/stars/yankouskia/localize-react.svg?style=social)\n\n[![NPM](https://nodei.co/npm/localize-react.png?downloads=true)](https://www.npmjs.com/package/localize-react)\n\n# localize-react\n\n✈️ Lightweight React Localization Library 🇺🇸\n\n## Motivation\n\nCreating really simple lightweight library for localization in React applications without any dependencies, which is built on top of new [React Context Api](https://reactjs.org/docs/context.html)\n\nLibrary has just **737 Bytes** gzipped size\n\n\n## Installation\n\nnpm:\n\n```sh\nnpm install localize-react --save\n```\n\nyarn:\n\n```sh\nyarn add localize-react\n```\n\n## API\n\n### Provider & Consumer\n\n`LocalizationProvider` is used to provide data for translations into React context. The root application component should be wrapped into `LocalizationProvider`. Component has the next props:\n- `children` - children to render\n- `locale` - [OPTIONAL] locale to be used for translations. If locale is not specified regular translations object will be used as map of `{ key: translations }`\n- `translations` - object with translations\n- `disableCache` - boolean variable to disable cache on runtime (`false` by default). Setting this to `true` could affect runtime performance, but could be useful for development.\n\nExample:\n\n```js\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { LocalizationConsumer, LocalizationProvider } from 'localize-react';\n\nconst TRANSLATIONS = {\n  en: {\n    name: 'Alex',\n  },\n};\n\nconst App = () => (\n  <LocalizationProvider\n    disableCache\n    locale=\"en\"\n    translations={TRANSLATIONS}\n  >\n    <LocalizationConsumer>\n      {({ translate }) => translate('name')}\n    </LocalizationConsumer>\n  </LocalizationProvider>\n);\n\nReactDOM.render(<App />, node); // \"Alex\" will be rendered\n```\n\n### Message\n\n`Message` component is used to provide translated message by specified key, which should be passed via props. Component has the next props:\n- `descriptor` - translation key (descriptor)\n- `defaultMessage` - message to be used in case translation is not provided (values object are applied to default message as well)\n- `values` - possible values to use with template string (Template should be passed in next format: `Hello {{name}}`)\n\nExample:\n\n```js\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { LocalizationProvider, Message } from 'localize-react';\n\nconst TRANSLATIONS = {\n  en: {\n    name: 'Alex',\n  },\n};\n\nconst App = () => (\n  <LocalizationProvider\n    locale=\"en\"\n    translations={TRANSLATIONS}\n  >\n    <Message descriptor=\"name\" />\n  </LocalizationProvider>\n);\n\nReactDOM.render(<App />, node); // \"Alex\" will be rendered\n```\n\nTo use with templates:\n\n```js\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { LocalizationProvider, Message } from 'localize-react';\n\nconst TRANSLATIONS = {\n  en: {\n    name: 'Hello, {{name}}!',\n  },\n};\n\nconst App = () => (\n  <LocalizationProvider\n    locale=\"en\"\n    translations={TRANSLATIONS}\n  >\n    <Message descriptor=\"name\" values={{ name: 'Alex' }} />\n  </LocalizationProvider>\n);\n\nReactDOM.render(<App />, node); // \"Alex\" will be rendered\n```\n\nTo use with default message:\n\n```js\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { LocalizationProvider, Message } from 'localize-react';\n\nconst TRANSLATIONS = {\n  en: {},\n};\n\nconst App = () => (\n  <LocalizationProvider\n    locale=\"en\"\n    translations={TRANSLATIONS}\n  >\n    <Message\n      descriptor=\"name\"\n      defaultMessage=\"Hello, {{name}}!\"\n      values={{ name: 'Alex' }}\n    />\n  </LocalizationProvider>\n);\n\nReactDOM.render(<App />, node); // \"Alex\" will be rendered\n```\n\n### useLocalize\n\n`useLocalize` hook is used to provide localization context, which can be used for translation.\n\n**NOTE**\n\nKeep in mind, that hooks are not supported in class components!\n\nExample:\n\n```js\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { LocalizationProvider, useLocalize } from 'localize-react';\n\nconst TRANSLATIONS = {\n  en: {\n    name: 'Alex',\n  },\n};\n\nfunction Test() {\n  const { translate } = useLocalize();\n\n  return translate('name');\n}\n\nconst App = () => {\n\n  return (\n    <LocalizationProvider\n      locale=\"en\"\n      translations={TRANSLATIONS}\n    >\n      <Test />\n    </LocalizationProvider>\n  );\n}\n\nReactDOM.render(<App />, node); // \"Alex\" will be rendered\n```\n\n### Templates\n\nIt's possible to use templates inside translation strings with highlighting templates using double curly braces. To pass correpospondent values:\n\n```js\n  const translation = translate('My name is {{name}}. I am {{age}}', { name: 'Alex', age: 25 });\n```\n\nOr with React component:\n\n```js\n  <Message descriptor=\"My name is {{name}}. I am {{age}}\" values={{ name: 'Alex', age: 25 }} />\n```\n\n### contextType\n\nAlternative way of usage inside class components:\n\n```js\nimport React from 'react';\nimport { LocalizationContext, LocalizationProvider } from 'localize-react';\n\nconst TRANSLATIONS = {\n  en: {\n    name: 'Alex',\n  },\n};\n\n\nclass Translation extends React.PureComponent {\n  render() {\n    return (\n      <span>\n        {this.context.translate('name')}\n      </span>\n    )\n  }\n}\n\nTranslation.contextType = LocalizationContext;\n\nconst App = () => {\n  return (\n    <LocalizationProvider\n      locale=\"en\"\n      translations={TRANSLATIONS}\n    >\n      <Translation />\n    </LocalizationProvider>\n  );\n}\n\nReactDOM.render(<App />, node); // \"Alex\" will be rendered\n```\n\n### locale\nLocale could be passed in short or long option.\n\n\nValid examples:\n\n```\nen-us\nEN_US\nen\neN-uS\n```\n\n### translations\nTranslations could be passed in any object form (plain or with deep properties)\n\nValid examples:\n\n```js\nconst translations = {\n  n: {\n    a: {\n      m: {\n        e: 'Alex',\n      },\n    },\n  },\n},\n```\n\nYou could use key with dot delimiter to access that property:\n\n```js\n<Message descriptor=\"n.a.m.e\" /> // will print \"Alex\"\n```\n\nIf there is no exact match in translations, then the value of locale will be sanitized and formatted to **lower_case_separate_by_underscore**. Make sure you provide translations object with keys in this format. If translations for long locale will not be found, and translations will be found for shorten alternative - that version will be used\n\n## Restriction\n\nAt least `React 16.8.0` is required to use this library, because new React Context API & React Hooks\n\n## Contributing\n\n`localize-react` is open-source library, opened for contributions\n\n### Tests\n\n**Current test coverage is 100%**\n\n`jest` is used for tests. To run tests:\n\n```sh\nyarn test\n```\n\n### License\n\nlocalize-react is [MIT licensed](https://github.com/yankouskia/localize-react/blob/master/LICENSE)\n","readmeFilename":"README.md","homepage":"https://github.com/yankouskia/localize-react#readme","bugs":{"url":"https://github.com/yankouskia/localize-react/issues"}}