{"_id":"translate-google-api","_rev":"5-b5fdf911997a34f1a4c9e6a5a6109282","name":"translate-google-api","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"translate-google-api","version":"1.0.0","description":"A free and unlimited API for Google Translate（contains single and multiple）","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["google","translate","multiple","language","react","react-native"],"repository":{"type":"git","url":"git+https://github.com/Binhluan1234/react-google-translate-api.git"},"author":{"name":"LuanNguyen"},"license":"ISC","dependencies":{"axios":"^0.20.0"},"gitHead":"db9587ea3b681470f7f4266156aa5906e601004b","bugs":{"url":"https://github.com/Binhluan1234/react-google-translate-api/issues"},"homepage":"https://github.com/Binhluan1234/react-google-translate-api#readme","_id":"translate-google-api@1.0.0","_nodeVersion":"13.10.1","_npmVersion":"6.14.3","dist":{"integrity":"sha512-xiGlfxpVhu55qfzTubXzz4My+onsOPxCZn8+hETu20iejaxrYanxlrvsR05aldQCeRTeFzi7ezW5bB/1/DlfTw==","shasum":"ae31b2882f02b5abd82543ac833ff0322359ebd8","tarball":"https://registry.npmjs.org/translate-google-api/-/translate-google-api-1.0.0.tgz","fileCount":7,"unpackedSize":13212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRm2iCRA9TVsSAnZWagAANGIP/3iRQrFJ7g5TOPy4xyWi\nqTIP0Je4qvxKmQiO1joiEmSFS+wERMVO7uskz+va0kB4E0rhsKBEidoat9UF\nkj/F+2L2UTPQZnSUTAPUhy0c6mYWJlfKCA9atGui+AcRfBQ4TL0ziOWmFmDl\nyURCA7VfOnF6qNQlLmOoi6xjv0B9ePGM1FLXLWS43pVF/GskFRY2/lWp0gyR\nMJf+EbD1UOtHLcXjTdsw84RYtnj+yB4j9NdIjZBiyi2Ell8psb7sZvOh22pp\n7PjGcQ8zV3N5LcFhu8RKblajILDiIuRnMB9gwFl7r94lBUBgVhyQXxEdwLuB\ncMxTeHP2o5hX8kBkUCKK/karad643jKQxR5gRaQiWS7gx2DEYe8QpHUVxv1o\n/Qnme+af/G6hyPC1mUfczcqdtz0sJJyJX00y3aYjbq5vLsuOFIQCV9+IHQjc\niVPTYZaVeZJNSE3QzstSng+3F1xrT1TR69iEX/vUCJnzCrJOSfrB7PwfhYZ1\nF7Hgb/3eqDj6k1tc1X9jed8SC2PVYA1Uh+cyTuJj9c8w8NH1+ZgBdPHgEhWN\npqHsG7cO3jIzHYZCIHQgZm5SPNKVjg4cIbchurUbE0joduhc0qUtOkgXHzbl\n9ooUkEL57Ys1PVJWsY/DgjSRNsoXpLCcZ2mH8T0qU5A5E0BsSWMFa4nXbCkR\nMrwU\r\n=R0R6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHKfZ4rD50Qxg4cuCnfGabZ0h5nmri08VfsJgB8CtxzQIgfPzwj/Yy9YDl17PvADxKej7UAcwzduCraa1usEUJ2HI="}]},"maintainers":[{"name":"luan_nguyen","email":"luansasuke02@gmail.com"}],"_npmUser":{"name":"luan_nguyen","email":"luansasuke02@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/translate-google-api_1.0.0_1598451105856_0.7244300989856491"},"_hasShrinkwrap":false},"1.0.1":{"name":"translate-google-api","version":"1.0.1","description":"A free and unlimited API for Google Translate（contains single and multiple）","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["google","translate","multiple","language","react","react-native"],"repository":{"type":"git","url":"git+https://github.com/Binhluan1234/react-google-translate-api.git"},"author":{"name":"LuanNguyen"},"license":"ISC","dependencies":{"axios":"^0.20.0"},"gitHead":"46c4bce8852b62d2ae6810cd36ca074ff4e94aff","bugs":{"url":"https://github.com/Binhluan1234/react-google-translate-api/issues"},"homepage":"https://github.com/Binhluan1234/react-google-translate-api#readme","_id":"translate-google-api@1.0.1","_nodeVersion":"13.10.1","_npmVersion":"6.14.3","dist":{"integrity":"sha512-aTdnWULErvx7vWRFltI+Y2bIfm8s+AdMr6CdM4h1TLkXeC3Y96YKQmDmVn1dZRm5Iijr970ju4zXwSSVTyCTGA==","shasum":"3393b41d00331496c0a9b4f21d84fa33d1b505e7","tarball":"https://registry.npmjs.org/translate-google-api/-/translate-google-api-1.0.1.tgz","fileCount":7,"unpackedSize":13212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRm5ICRA9TVsSAnZWagAABBAP/AwwOaOGPaYLL14jSnq8\nlYMqUIrVmCPJtM6Zca+Ae5phz5tUhgXpLKdhcwrAPn8i9RcGYzz3QQnbVUFV\nUeFRO3eu40EsNu/8ch2IoR7DxLf6sWYxLLkPekXLdAP+HkuuzavFvGOABhK2\nxx2cs1zEuLVx9UfAYaslNKDzGVq9eFA/9AlgM+TxwtsDuA2oa4KDREV0ub9m\nzFA6mTohuqW/1h1PVL1/Ewb6+DKougSbaQoS9ePLWYNcVYtm5tEK04wzmimW\nu19JTtH76SIGKNb8sZ++t0yMrUApPsM0M7dNQGQbFcgl924ltBupq0xtLYRv\ndxHZGswmdbE0ukSL98Rat3UFb3XmIJywL+xF5RbYDoV9EGECukYuGJRhiR0f\nXmXF5rWN/DvQkEAvH0HBtOXdvnetFcGy5GqbJJDNa06CR9rav9B9Nvj9aNG1\nEsNapLYKi++K5aPKw2O5PC6JMupnzhBulF28MKYrzhHmeoKeuPFo53iQFC89\nzBHEjVL4X0Ge/vM2+7XHBA1gEXxuf/snRluPdtJgZFHySq3QIMFF7Vs//BhF\nBvdGFMTtDRoqXpPJ8pFIrUDEDODA/AeotQQ8dv+fh70jAFMFQLLSq9HmNBg5\n+OxWKcua47za1HzGUAhADylsI+dJbmJlI//z22gYJXM3OkARpLPqO9o9n6Nc\nL0pu\r\n=T2h4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEE2ovFSROZD1ka5tcxAxXe6Cp3rxeoILS9fJkOy2HBAAiEA6IZXFa0Me2uE3Y6rJtPaftXlOnKYHNm4ZEB+7FHkcB0="}]},"maintainers":[{"name":"luan_nguyen","email":"luansasuke02@gmail.com"}],"_npmUser":{"name":"luan_nguyen","email":"luansasuke02@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/translate-google-api_1.0.1_1598451271700_0.4917867935842495"},"_hasShrinkwrap":false},"1.0.2":{"name":"translate-google-api","version":"1.0.2","description":"A free and unlimited API for Google Translate（contains single and multiple）","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["google","translate","multiple","language","react","react-native"],"repository":{"type":"git","url":"git+https://github.com/Binhluan1234/react-google-translate-api.git"},"author":{"name":"LuanNguyen"},"license":"ISC","dependencies":{"axios":"^0.20.0"},"gitHead":"9062768c6d78b80d721b3ded56053156cb203d1a","bugs":{"url":"https://github.com/Binhluan1234/react-google-translate-api/issues"},"homepage":"https://github.com/Binhluan1234/react-google-translate-api#readme","_id":"translate-google-api@1.0.2","_nodeVersion":"13.10.1","_npmVersion":"6.14.3","dist":{"integrity":"sha512-w8kDIxl2ZV/iWM09+kZILBN9m36l2bEFKa/Fz/LQT4dlrTQS3B2gSHqCqgBMltTskHh7K+HHmQO19psV5drX4w==","shasum":"c710d649025b1b9632579dbdce674fccc7f01c95","tarball":"https://registry.npmjs.org/translate-google-api/-/translate-google-api-1.0.2.tgz","fileCount":7,"unpackedSize":12679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRzLyCRA9TVsSAnZWagAAFz8P/iFqLmDcbrAh3J4Ba27E\nS66W1N2HpLYOPSdoeU0Du1Xo1S4Zkwk6aWrQkTe7kbvcNu8exzqOFvaOsVbg\nCKlb2RSRtZ8/0OCyzc4zevHHfN5RtSfgbD0XMUbA5qQB0NT5pY145mZ8ri+G\n1mIHfWN5Vu8yRomglWqlcg/1qzmBFwe97/OSi4Aesy81UUeeDPGqR2iuCwLu\nw4zTNuIGpkNbdwUqReAznQb93cca12C4W/4TrEUkoTWvGEgCjE95na0HmcVW\nK0ZNAR9mEdr+5c8k/HR05zftnX89ICsiNLca+NeHmTpA6pIiUNncIbkHzRLL\ncu2UJptdkCERzmcZ7SGRs4E5De5xggNuq8Ag5vM6G6+un/v2G0fUNpBqBTZI\nMCvVvXtSUE1H7MMBb0AZYTT/SsGwOhNp18NUZ3dHGa8l00uduBvdPSPKA4QA\nsekyS73Ez9Rh8RmxtAxVL4yqtTw+04wCH6Fky8C1N/rQCBwgc1k56uh4UBo+\neBnnzkZXZlS17t6yMB09a7EkWmZ18+V3lwMowEo0OXzc5XkzBtLJJaElWJ18\nZ+eB06SKTkJy+R6L4SnlcI1Ir7uRBbpJOMu4kOnOtPTnqAjQC1lMKL7TP+PB\nWwF09ByszU/pc0etpV4hj3Zs2gtYInrFd/Ml7vu2KF+1KUjN6cBaTZibPGDn\nsRFh\r\n=4anb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4ehWjZYAz4XRQS6wMsDSr4B3q6W/Dp1l+PeFzqEPzhAiEA9g3HeVjveW1Pqe+IgYEwXUYi7bz1ALgnx3Rp6fXqURg="}]},"maintainers":[{"name":"luan_nguyen","email":"luansasuke02@gmail.com"}],"_npmUser":{"name":"luan_nguyen","email":"luansasuke02@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/translate-google-api_1.0.2_1598501617631_0.5291182561699062"},"_hasShrinkwrap":false},"1.0.3":{"name":"translate-google-api","version":"1.0.3","description":"A free and unlimited API for Google Translate（contains single and multiple）","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["google","translate","multiple","language","react","react-native"],"repository":{"type":"git","url":"git+https://github.com/Binhluan1234/react-google-translate-api.git"},"author":{"name":"LuanNguyen"},"license":"ISC","dependencies":{"axios":"^0.20.0"},"gitHead":"cfcca2626627c9fc90feebb2f9149a917a724147","bugs":{"url":"https://github.com/Binhluan1234/react-google-translate-api/issues"},"homepage":"https://github.com/Binhluan1234/react-google-translate-api#readme","_id":"translate-google-api@1.0.3","_nodeVersion":"13.10.1","_npmVersion":"6.14.3","dist":{"integrity":"sha512-5o8vOw0AWen0nw8VjbFuaRCJxkYw9iZzP5RR033P41f8uWithTknoj61jv4gL6a8b4yqKmEAF6Cdzh4ixxT6Hw==","shasum":"02702c9921f0b921b54f84c13f303c4eb4e760f0","tarball":"https://registry.npmjs.org/translate-google-api/-/translate-google-api-1.0.3.tgz","fileCount":7,"unpackedSize":12730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRzaPCRA9TVsSAnZWagAA5L8P/3C66+c+Oaomimy3thEP\nQe3KURYi20jm3sFwWoXZF0lqjOP8f/JOWh3IYEZothA3H894pvD851oPGUPJ\nVye5esOLKCD5RTtUmNmZTjzNOU0vQSfOGojkOiT/Hto+0bYDbDXkM/Plw25a\nI8xirF8VNmWY8LfScYROoVc+9/H+UJq8j79fXA8fgx3DCKjyZYnj722qV58F\nLm9x9zTkxDRdEMKfG2qqX1GytV6r4gEWFLY1zZZLexLxarpsYl8+I2LebZzu\nBdCuiOwLAreHrgsMIwgefOzFXqN6xV4gyiuszD6AWblm7XboPOi86pVgbzzm\nsBkpIiXSGnafZbtmUroOmvcxtpp8E+teVnZ/AYEqNWNuljoI5J4Mb41fcZRg\nOyNHqgfA5i8R9JL12jpJdEJoXSBTZ37osxhKccqDGdzgO30LT2EBgyUdEZps\nsJiOvrnTOChVMQReDnBPHxdNt0Ng4GRoj9/Crvg5g2QyH2gZzElGCqi2aLZF\nzbqPApX9ROJB09myPHXbCklIv3nnNpll6a82r24pguFbrjp0qfrEFMQux7Fl\nFYEI0MjnsuzD1t7n6mCsl2PbQBqCjmtwG4bWCkFYDzrU6QoiQI7d8nc3Hq4I\nSWc09AJN10fkGDGqnmb9EA/fyqc3ex6m2ow5tVAIpoxUBuB8xdMF09ok4KD5\nzR5T\r\n=aUnG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIATNwFPBG1MDKtlISeREOxAp6AIyWQpyQeXX4OFrnDj3AiEA93bK0QhMjYzOVECXz3ZwUmh7k9BlybY9fp6kf3R84y4="}]},"maintainers":[{"name":"luan_nguyen","email":"luansasuke02@gmail.com"}],"_npmUser":{"name":"luan_nguyen","email":"luansasuke02@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/translate-google-api_1.0.3_1598502542964_0.394077932705831"},"_hasShrinkwrap":false},"1.0.4":{"name":"translate-google-api","version":"1.0.4","description":"A free and unlimited API for Google Translate（contains single and multiple）","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["google","translate","multiple","language","react","react-native"],"repository":{"type":"git","url":"git+https://github.com/Binhluan1234/react-google-translate-api.git"},"author":{"name":"LuanNguyen"},"license":"ISC","dependencies":{"axios":"^0.20.0"},"gitHead":"da9cb4cd3a9b644d19c315fe90a7227f27c11124","bugs":{"url":"https://github.com/Binhluan1234/react-google-translate-api/issues"},"homepage":"https://github.com/Binhluan1234/react-google-translate-api#readme","_id":"translate-google-api@1.0.4","_nodeVersion":"13.10.1","_npmVersion":"6.14.3","dist":{"integrity":"sha512-KVXmo4+64/H1vIbnzf2zNiJ2JLeEB3jrEnNRP2EFNAGNqna/5bmw/Cps3pCHu0n3BzTOoWh9u6wFvrRYdzQ6Iw==","shasum":"562073926d4fa069ea4c105a69c0af9e1536bd92","tarball":"https://registry.npmjs.org/translate-google-api/-/translate-google-api-1.0.4.tgz","fileCount":7,"unpackedSize":12740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSGJ3CRA9TVsSAnZWagAAmcQQAImpk+1Dgg2bTgG1xQQy\nlobJFkWIHfG6zK5gjI72O0nfhoUCEy7YEegLV9T0Z/blKWet1ct0QrbfylYR\nmybnQlmsqeJpelBIt8OdX9eclKJ5rj2Bhy1ADXtipjMqP3qLRvZb4svZAJM+\nTbIv3l4Ox6Kc4FRqp7Uid/LSIMA92I4ljsxawo6k9YFbwknnwqrO+v4NARu6\nmnKMqvuNcE/LH8usGkh/OARJMx4j2OGCbieE9/mFPADONPXnB8FFxuatBDfQ\ndaN+XUHPXcL6vD/e9PUAFMGOb1/zTlrk5in8UXHXirziqmXx7wthTuXVkCNk\nkySnv6u+u5vr0IAhdI1SHZt9hu1kSMlq9ukRqfyIcUfmL8pssn7DtwWRdYaP\nDdHqMgvPiZ654JtaENRRc0DC3K9tvkmb0SGZYrjxQKspBAux4sk8gQpsTCan\nSbpyLV2rWh88mxUhTO/7op+bKElzWd8Oc1x5osdVyHpUCutBfpnN7KDZM/jb\nJg4NCLz2+k8l5IoN4hoNXVeDpOBRcsW02EVfRC2gluPbi/qnuwo/+1JKPGvB\nBgWRMe2ZWNsrElkeUJcvhECvWwmppP1HnMHg51XtegSXEJUZjD8ZNa/vnSjK\nl7Ts2I/9CSIi5Ez6+lqHm86lRQjh/1tVepwYrE4wEsaaml6zv/a3XTvAKpHl\ndH6E\r\n=knv8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyBY4UjB9M7aUjW63WJzEFQ6RkD6n9UDllC4jQH8xe3AIhAJQsQXiqFhniMOHdSWtnsBskng0spjjm8oHhpcMZCgLO"}]},"maintainers":[{"name":"luan_nguyen","email":"luansasuke02@gmail.com"}],"_npmUser":{"name":"luan_nguyen","email":"luansasuke02@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/translate-google-api_1.0.4_1598579319292_0.8731995585525594"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-26T14:11:45.856Z","1.0.0":"2020-08-26T14:11:46.149Z","modified":"2022-05-22T04:07:36.697Z","1.0.1":"2020-08-26T14:14:31.819Z","1.0.2":"2020-08-27T04:13:37.766Z","1.0.3":"2020-08-27T04:29:03.115Z","1.0.4":"2020-08-28T01:48:39.399Z"},"maintainers":[{"name":"luan_nguyen","email":"luansasuke02@gmail.com"}],"description":"A free and unlimited API for Google Translate（contains single and multiple）","homepage":"https://github.com/Binhluan1234/react-google-translate-api#readme","keywords":["google","translate","multiple","language","react","react-native"],"repository":{"type":"git","url":"git+https://github.com/Binhluan1234/react-google-translate-api.git"},"author":{"name":"LuanNguyen"},"bugs":{"url":"https://github.com/Binhluan1234/react-google-translate-api/issues"},"license":"ISC","readme":"# translate-google-api\nA free and unlimited API for Google Translate（support single text and Multi-segment text） 💵🚫\n# Feature\n\n- Multi-segment text support\n- Auto language detection\n- Language correction\n- Fast and reliable – it uses the same servers that [translate.google.com](https://translate.google.com/) uses\n- Free and unlimited (translate.google.com uses a token to authorize the requests. If you are not Google, you do not have this token and will have to pay [$20 per 1 million characters of text](https://cloud.google.com/translate/v2/pricing))\n- Supports: ReactJs, React-Native, NodeJs ...\n\n# Install\n\n```shell\nnpm install --save translate-google-api\n```\n\n# Why this repo ？\n\nI have tried some libs for translate on React-Native app. But don't have any package support.\n\nI don't want to translate all the text first and I'd like to translate segment by segment. Especially in an article, the whole translation may not work well.\n\nIn the existing library, if I want to translate multi-segment text, I have to request multiple times.(like [google-translate-api](https://github.com/matheuss/google-translate-api))\n\nSo I have to use the new api to implement, so the `translate-google-api` is born.\n\n# Usage\n\nSingle segment\n```javascript\nimport translate from 'translate-google-api';\nconst result = await translate(`I'm fine.`, {\n  tld: \"cn\",\n  to: \"vi\",\n});\n// [\"Tôi ổn.\"]\n\n\n```\n\nMulti-segment text\n```javascript\nimport translate from 'translate-google-api';\n\nconst result = await translate(['Hi', 'How are you?', `I'm fine`], {\n  tld: \"cn\",\n  to: \"vi\",\n});\n//[\"Chào\",\"Bạn khỏe không?\",\"Tôi ổn.\"]\n\n```\n\nProxy\n\nproxy-config [https://github.com/axios/axios#request-config](https://github.com/axios/axios#request-config)\n```javascript\nconst result = await translate([`I'm fine. And you?`,`I'm ok.`], {\n  tld: \"cn\",\n  to: \"vi\",\n  proxy: {\n    host: '127.0.0.1',\n    port: 9000,\n    auth: {\n      username: 'mikeymike',\n      password: 'rapunz3l'\n    }\n  }\n});\n```\n\n# API\n\n## translate(text, options)\n\n### text\n\nType: `string`, `array`\n\nThe text to be translated\n\n### options\n\nType: object\n\n**from？**\nType: `string` Default: auto\n\nThe text language. Must be auto or one of the codes/names (not case sensitive) contained in src/languages.ts\n\n**to**\nType: `string` Default: en\n\nThe language in which the text should be translated. Must be one of the codes/names (not case sensitive) contained in src/languages.ts.\n\n**tld**\nType: `string` 'com' | 'cn' <Default 'com'>\n\n`cn` is for China, `com` for others.\n\n**proxy**\nType: `AxiosProxyConfig`\n\nproxy for request.\n\n**config**\nType: `object`\n\nconfig for [axios](https://github.com/axios/axios)\n\n# Related\n- [vitalets/google-translate-token](https://github.com/vitalets/google-translate-token)\n- [google-translate-api](https://github.com/matheuss/google-translate-api)\n- [translate-md-viewer](https://github.com/hua1995116/translate-md-viewer)\n\n# Inspiration\n\n# License\n\nApache License","readmeFilename":"README.md"}