{"id":28000971,"url":"https://github.com/siamahnaf/google-translate","last_synced_at":"2026-02-23T03:50:04.383Z","repository":{"id":288393579,"uuid":"966246937","full_name":"siamahnaf/google-translate","owner":"siamahnaf","description":"A nodejs package for translating text using google translate for free! It also support batching translation!","archived":false,"fork":false,"pushed_at":"2026-01-02T09:41:49.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-08T09:17:53.363Z","etag":null,"topics":["google-translate","google-translate-api","nodejs-google-translate","translate"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@siamf/google-translate","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siamahnaf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-14T16:17:57.000Z","updated_at":"2026-01-02T09:41:52.000Z","dependencies_parsed_at":"2025-04-20T07:33:50.772Z","dependency_job_id":null,"html_url":"https://github.com/siamahnaf/google-translate","commit_stats":null,"previous_names":["siamahnaf/google-translate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/siamahnaf/google-translate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siamahnaf%2Fgoogle-translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siamahnaf%2Fgoogle-translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siamahnaf%2Fgoogle-translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siamahnaf%2Fgoogle-translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siamahnaf","download_url":"https://codeload.github.com/siamahnaf/google-translate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siamahnaf%2Fgoogle-translate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29736957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T02:24:00.660Z","status":"ssl_error","status_checked_at":"2026-02-23T02:22:56.087Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-translate","google-translate-api","nodejs-google-translate","translate"],"created_at":"2025-05-08T23:56:13.539Z","updated_at":"2026-02-23T03:50:04.366Z","avatar_url":"https://github.com/siamahnaf.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/siamahnaf"],"categories":[],"sub_categories":[],"readme":"\u003cpicture\u003e\r\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/siamahnaf/assets-kit/main/logo/logo-white.png\"\u003e\r\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/siamahnaf/assets-kit/main/logo/logo-black.png\"\u003e\r\n  \u003cimg alt=\"Siam Ahnaf\" src=\"https://raw.githubusercontent.com/siamahnaf/assets-kit/main/logo/logo-black.png\" height=\"auto\" width=\"240\"\u003e\r\n\u003c/picture\u003e\r\n\r\n# @siamf/google-translate\r\nA nodejs package for translating text using google translate for free! It also support batching translation!\r\n\r\n## Introduction\r\n\r\nA Node.js package for translating text using Google Translate for free, with support for batching translation, involves several steps. Below is a detailed guide on how you can achieve this using the google-translate-nodejs package.\r\n\r\n## Support Me\r\n\r\n\u003ca href=\"https://www.buymeacoffee.com/siamahnaf\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\r\n\r\n## Features\r\n\r\n- Fast and lightweight\r\n- Batching translation. You can translate one text to many target language at a time.\r\n- No unnecessary Dependencies\r\n- Now Multi translation is supported. You can translate a object into multiple languages\r\n- Small in Size (16KB)\r\n\r\n## Installing\r\n\r\nUsing npm\r\n\r\n```bash\r\n$ npm install @siamf/google-translate\r\n```\r\n\r\n## Batch Translation Example\r\n\r\n```javascript\r\nimport { translate } from \"@siamf/google-translate\";\r\n\r\nconst { data } = await translate.batch(\"How are you\", [\"bn\", \"fr\", \"en\", \"es\", \"de\", \"ar\", \"ja\", \"ko\", \"ru\", \"pt\", \"it\", \"hi\", \"zh\", \"tr\", \"nl\", \"sv\", \"pl\", \"vi\", \"th\"]);\r\n\r\nconsole.log(data);\r\n\r\n//And result will be printed like-\r\n\r\n{\r\n  source: { lan: 'auto', text: 'How are you' },\r\n  target: [\r\n    { lan: 'bn', text: 'আপনি কেমন আছেন' },\r\n    { lan: 'fr', text: 'Comment vas-tu' },\r\n    { lan: 'en', text: 'How are you' },\r\n    { lan: 'es', text: 'Cómo estás' },\r\n    { lan: 'de', text: 'Wie geht es dir' },\r\n    { lan: 'ar', text: 'كيف حالك' },\r\n    { lan: 'ja', text: '元気ですか' },\r\n    { lan: 'ko', text: '어떻게 지내세요' },\r\n    { lan: 'ru', text: 'Как вы' },\r\n    { lan: 'pt', text: 'Como vai' },\r\n    { lan: 'it', text: 'Come stai' },\r\n    { lan: 'hi', text: 'आप कैसे हैं?' },\r\n    { lan: 'zh', text: '你好吗' },\r\n    { lan: 'tr', text: 'Nasılsın' },\r\n    { lan: 'nl', text: 'Hoe is het' },\r\n    { lan: 'sv', text: 'Hur mår du' },\r\n    { lan: 'pl', text: 'Jak się masz' },\r\n    { lan: 'vi', text: 'Bạn có khỏe không' },\r\n    { lan: 'th', text: 'คุณเป็นอย่างไร' }\r\n  ]\r\n}\r\n\r\n//For typescript you can import Response Types also-\r\nimport { BatchResponse } from \"@siamf/google-translate\";\r\n```\r\n\r\n## API For Batch Translations-\r\n\r\n### translate.batch(text, targetLanguages, options)\r\n\r\n#### text\r\n- Type: `String`\r\n- Description: The main text which need to be translated\r\n\r\n#### targetLanuages\r\n- Type: `String[]` `(String array)`\r\n- Description: A array of string with lanuage code\r\n\r\n#### options\r\n- Type: `Object`\r\n- Description: Options Object (Optional)\r\n\r\n##### from\r\n- Type: `String`\r\n- Description: From Language\r\n- Default: `auto`\r\n\r\n\r\n## Single Translation Example\r\n\r\n```javascript\r\nimport { translate } from \"@siamf/google-translate\";\r\n\r\nconst { data } = await translate.single(\"How are you\", \"fr\");\r\nconsole.log(data);\r\n\r\n//And result will be printed like-\r\n{\r\n  source: { lan: 'auto', text: 'How are you?' },\r\n  target: { lan: 'fr', text: 'Comment vas-tu?' }\r\n}\r\n\r\n//For typescript you can import Response Types also-\r\nimport { SingleResponse } from \"@siamf/google-translate\";\r\n```\r\n\r\n## API For Single Translations-\r\n\r\n### translate.single(text, targetLanguage, options)\r\n\r\n#### text\r\n- Type: `String`\r\n- Description: The main text which need to be translated\r\n\r\n#### targetLanguage\r\n- Type: `String`\r\n- Description: The target language code\r\n\r\n#### options\r\n- Type: `Object`\r\n- Description: Options Object (Optional)\r\n\r\n##### from\r\n- Type: `String`\r\n- Description: From Language\r\n- Default: `auto`\r\n\r\n\r\n## Multi Translation Example\r\n\r\n```javascript\r\nimport { translate } from \"@siamf/google-translate\";\r\nconst text = {\r\n  title: \"How are you?\",\r\n  description: \"Here's a collection of news, notes, and highlights from Wednesday's on-field action.\",\r\n  otherText: \"Other text\"\r\n}\r\nconst target = [\"bn\", \"fr\", \"es\", \"ar\", \"de\"]\r\nconst { data } = await translate.multi(text, target);\r\nconsole.log(data);\r\n\r\n//And result will be printed like-\r\n{\r\n  source: { lan: 'auto' },\r\n  target: [\r\n    {\r\n      languageCode: 'bn',\r\n      title: 'আপনি কেমন আছেন?',\r\n      description: 'এখানে বুধবারের মাঠের অ্যাকশন থেকে খবর, নোট এবং হাইলাইটগুলির একটি সংগ্রহ রয়েছে৷',\r\n      otherText: 'অন্যান্য পাঠ্য'\r\n    },\r\n    {\r\n      languageCode: 'fr',\r\n      title: 'Comment vas-tu?',\r\n      description: \"Voici une collection d'actualités, de notes et de faits saillants de l'action sur le terrain de mercredi.\",\r\n      otherText: 'Autre texte'\r\n    },\r\n    {\r\n      languageCode: 'es',\r\n      title: '¿Cómo estás?',\r\n      description: 'Aquí hay una colección de noticias, notas y momentos destacados de la acción en el campo del miércoles.',\r\n      otherText: 'Otro texto'\r\n    },\r\n    {\r\n      languageCode: 'ar',\r\n      title: 'كيف حالك؟',\r\n      description: 'فيما يلي مجموعة من الأخبار والملاحظات والأحداث البارزة من الأحداث الميدانية يوم الأربعاء.',\r\n      otherText: 'نص آخر'\r\n    },\r\n    {\r\n      languageCode: 'de',\r\n      title: 'Wie geht es dir?',\r\n      description: 'Hier finden Sie eine Sammlung von Neuigkeiten, Notizen und Highlights vom Spielfeldeinsatz am Mittwoch.',\r\n      otherText: 'Anderer Text'\r\n    }\r\n  ]\r\n}\r\n\r\n//For typescript you can import Response Types also-\r\nimport { MultiResponse } from \"@siamf/google-translate\";\r\n```\r\n\r\n## API For Single Translations-\r\n\r\n### translate.multi(textObject, targetLanguages, options)\r\n\r\n#### text\r\n- Type: `Object`\r\n- Description: The main text which need to be translated. It can be any object.\r\n\r\n#### targetLanguages\r\n- Type: `String[]`\r\n- Description: The target languages code. Array of string.\r\n\r\n#### options\r\n- Type: `Object`\r\n- Description: Options Object (Optional)\r\n\r\n##### from\r\n- Type: `String`\r\n- Description: From Language\r\n- Default: `auto`\r\n\r\n\r\n## Issues or correction\r\nIf you face any issues to any function, please let me know by creating a issue on github.\r\n\r\n## Connect with me\r\n\u003cdiv style=\"display: flex; align-items: center; gap: 3px;\"\u003e\r\n\u003ca href=\"https://wa.me/8801611994403\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/siamahnaf/assets-kit/main/icons/whatsapp.png\" width=\"40\" height=\"40\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://siamahnaf.com/\" style=\"margin-right: 8px\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/siamahnaf/assets-kit/main/icons/web.png\" width=\"40\" height=\"40\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://www.linkedin.com/in/siamahnaf/\" style=\"margin-right: 8px\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/siamahnaf/assets-kit/main/icons/linkedin.png\" width=\"40\" height=\"40\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://x.com/siamahnaf198\" style=\"margin-right: 8px\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/siamahnaf/assets-kit/main/icons/x.png\" width=\"40\" height=\"40\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://www.facebook.com/siamahnaf198/\" style=\"margin-right: 8px\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/siamahnaf/assets-kit/main/icons/facebook.png\" width=\"40\" height=\"40\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://t.me/siamahnaf198\" style=\"margin-right: 8px\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/siamahnaf/assets-kit/main/icons/telegram.png\" width=\"40\" height=\"40\"\u003e\u003c/a\u003e\r\n\u003ca href=\"https://www.npmjs.com/~siamahnaf\" style=\"margin-right: 8px\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/siamahnaf/assets-kit/main/icons/npm.png\" width=\"40\" height=\"40\"\u003e\u003c/a\u003e\r\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiamahnaf%2Fgoogle-translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiamahnaf%2Fgoogle-translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiamahnaf%2Fgoogle-translate/lists"}