Logo Lanfrica

elijahnewton/Universal-HumanLanguage-Batch-Translator-Cloud

Domain:

natural language processing

Record type:

software
Creator:
eli
Host:
Luganda Batch Translator Cloud # Multilingual Batch Translator Service A production-ready, highly resilient, and fully multilingual asynchronous Python microservice built with Flask, Gunicorn, and `boto3`. This service parses large text files (up to and over 400KB / ~8,000 lines), translates text dynamically between hundreds of language combinations using the Google Translation Engine, and tracks tasks asynchronously to prevent server timeouts. State persistence and continuation logic are handled completely out-of-band via Cloudflare R2 object storage. ## Key Features * **Fully Multilingual Architecture:** Translates dynamically between any source and target languages supported by Google Translate (e.g., English, Luganda, Spanish, Swahili, French, etc.) via dynamic UI controls. * **Multi-User Resilient:** Automatically prefixes incoming files with precise UTC timestamps (`YYYYMMDDHHMMSS_filename.txt`). Multiple users across different locations can upload identical or distinct files simultaneously without overwriting data or bleeding task state. * **Asynchronous Processing:** Long-running translations are offloaded into independent background worker threads, instantly returning HTTP `202 Accepted` to the browser. * **Zero-Downtime Design:** Web request handlers do not block, avoiding Gunicorn synchronization timeouts (`CRITICAL WORKER TIMEOUT`) and high peak-RAM crashes (`SIGKILL` OOM errors). * **Cloudflare R2 Synchronization:** Storage operates on an ephemeral runtime pattern. Originals and processed outputs are stored safely in isolated R2 bucket directories (`uploads/` and `outputs/`). * **Stateful Resumption:** If an interrupted file is uploaded again by a user, the backend automatically scans R2, evaluates how many lines have already been translated, and seamlessly picks up right where it stopped. * **Persistent Client Recovery:** The front-end user interface utilizes browser `localStorage` queues to automatically bind and recover status polling loops even if a user closes their tab, refr …