This documentation provides an overview and setup guide for a Go-based server designed to handle translation tasks with streaming support. The application leverages Python scripts for actual translation and package management functionalities, taking advantage of both Go's robust HTTP serving capabilities and Python's extensive libraries.
## Overview
The server offers an API endpoint to handle translation requests. It supports streaming of translation processes and package downloads, improving real-time feedback for end-users. It checks whether the necessary language packages are installed and initiates a download if they are missing, before proceeding with the translation.
## Features
- Streaming Translations: Utilizes server-sent events (SSE) to stream translation and download progress to the client.
- Package Management: Automatically checks for the required language packages and downloads them if not present.
- Language Support Checking: Validates if the requested language pairs are installed locally.
## Getting Started
### Prerequisites
Ensure you have the following installed:
- Go (version 1.15 or higher)
- Python (version 3.6 or higher)
- Python packages required by the translator scripts
### Setup
1. Clone the Repository: Clone or download the source code to your local machine.
2. Install Required Python Packages: Navigate to the `translator` directory and install necessary Python packages using pip: