{"id":26720091,"url":"https://github.com/saddam-94/docx-translator","last_synced_at":"2026-04-20T09:34:37.052Z","repository":{"id":281291250,"uuid":"944426905","full_name":"saddam-94/docx-translator","owner":"saddam-94","description":"docx translator for multiple language support.","archived":false,"fork":false,"pushed_at":"2025-03-08T05:18:18.000Z","size":1635,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T18:50:30.856Z","etag":null,"topics":["docker","docker-compose","machine-translation","nlp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saddam-94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-03-07T10:24:16.000Z","updated_at":"2025-03-12T08:57:06.000Z","dependencies_parsed_at":"2025-03-08T05:28:24.018Z","dependency_job_id":null,"html_url":"https://github.com/saddam-94/docx-translator","commit_stats":null,"previous_names":["saddam-94/docx-translator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saddam-94/docx-translator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saddam-94%2Fdocx-translator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saddam-94%2Fdocx-translator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saddam-94%2Fdocx-translator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saddam-94%2Fdocx-translator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saddam-94","download_url":"https://codeload.github.com/saddam-94/docx-translator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saddam-94%2Fdocx-translator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002311,"owners_count":26083340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docker","docker-compose","machine-translation","nlp"],"created_at":"2025-03-27T18:31:37.247Z","updated_at":"2025-10-09T23:33:18.935Z","avatar_url":"https://github.com/saddam-94.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Document Translation Project\n\nThis project provides a script to translate DOCX documents from one language to another using the Argos Translate library.\n\n## Prerequisites\n- Python\n- Docker\n- Docker Compose\n\n## Setup\n\n1. Clone the repository to your local machine.\n2. Navigate to the project directory.\n\nrun requirements.txt file\n```\npip install -r requirements.txt\n```\n\n## Docker Setup\n\n### Build the Docker Image\n\nTo build the Docker image, run the following command:\n\n```sh\ndocker-compose build\n```\nRun the Docker Container\nTo run the Docker container, use the following command:\n\n```sh\ndocker-compose up\n```\n\nUsage\nThe main script for translating documents is translate.py. This script reads the source and target languages from a YAML file (lang_code.yml) and translates all DOCX files in the specified input directory.\n\nCommand Line Arguments\n--input_path: The path to the directory containing the DOCX files to be translated.\n--output_path: The path to the directory where the translated DOCX files will be saved.\n--src_lang: The source language code (e.g., English for 'en').\n--tar_lang: The target language code (e.g., French for 'fr').\nExample\nTo translate documents from English to French, you can run the following command:\n```cmd\npython translate.py --input-path input_docx --output_path output_docx --src-lang 'English' --tar-lang 'Bengali'\n```\nBelow are list of language use can use\n```\nEnglish: en\nAfrikaans: af\nAlbanian: sq\nAmharic: am\nArabic: ar\nArmenian: hy\nBasque: eu\nBengali: bn\nBosnian: bs\nBulgarian: bg\nCatalan: ca\nChinese (Simplified): zh\nChinese (Traditional): zh-TW\nCroatian: hr\nCzech: cs\nDanish: da\nDutch: nl\nEstonian: et\nFinnish: fi\nFrench: fr\nGeorgian: ka\nGerman: de\nGreek: el\nGujarati: gu\nHaitian Creole: ht\nHebrew: he\nHindi: hi\nHungarian: hu\nIcelandic: is\nIndonesian: id\nItalian: it\nJapanese: ja\nKannada: kn\nKazakh: kk\nKhmer: km\nKorean: ko\nLatvian: lv\nLithuanian: lt\nMacedonian: mk\nMalay: ms\nMongolian: mn\nNepali: ne\nNorwegian: no\nPersian: fa\nPolish: pl\nPortuguese: pt\nPunjabi: pa\nRomanian: ro\nRussian: ru\nSerbian: sr\nSlovak: sk\nSlovenian: sl\nSomali: so\nSpanish: es\nSwahili: sw\nSwedish: sv\nTamil: ta\nTelugu: te\nTurkish: tr\nUkrainian: uk\nUrdu: ur\nVietnamese: vi\nWelsh: cy\nYiddish: yi\nZulu: zu\n```\n\nFor using as an python api, call below method,\n```python\nfrom translate import translate\n\ntranslated_txt = translate(input_path, output_path, src_lang, tar_lang)\ntranslated_tx.save(output_path)\n```\n\n```File Structure\ntranslate.py: The main script for translating DOCX documents.\nlang_code.yml: A YAML file containing language codes.\nDockerfile: The Dockerfile for building the Docker image.\ndocker-compose.yml: The Docker Compose file for setting up the Docker environment.\nrequirements.txt: A file listing the Python dependencies for the project.\n```\nExample output\n-------------------\nplease refer to the [documentation file](./output_docx/reference_translated_brochure.docx) as input docx. \nHere is the corresponding [output docx](./output_docx/brochure_fr.docx)\n\n## Possible improvement and speedup\n\nCurrently it can run 135.8s. If we can utilize multiprocesing or concurrent strategy by only spliting the txt as sentence, and execute all the cpu core then easily reduce the latency. Also we can use GPU machine if avalilabe which also reduce the execution time greatly.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaddam-94%2Fdocx-translator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaddam-94%2Fdocx-translator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaddam-94%2Fdocx-translator/lists"}