My google translate container based on the browser extension of the same name
9.5K
๐ Overview
This Docker image runs a lightweight translation service based on the Simple Translate browser extension.
Itโs designed for Calibre users who want to translate selected words or text directly from the Lookup / Search selected word feature with EPUB3 books created with Storyteller โ an application that synchronizes eBooks with audiobooks by highlighting the currently spoken sentence.
With this container running, you can instantly translate a selected word or sentence from your synchronized eBook, without leaving Calibre.
๐ฏ Typical Workflow
Use Storyteller to create an EPUB3 eBook synced with its audiobook.
Open the EPUB3 file in Calibre.
Select any word (or sentence) thatโs being highlighted as spoken.
Press L to trigger Calibreโs Lookup / Search selected word feature.
The selected text is sent to this service and translated.
This image runs a lightweight translation service based on the Simple Translate browser extension.
With this container running, you can send a request like:
http://simple-translate:5001/translate?q={word}&sl=ru&tl=esโ
โฆ and receive the translation instantly.
๐ Features
๐ Multiple languages โ source (sl) and target (tl) languages are configurable via query parameters
๐ณ Containerized โ easy to deploy with Docker or Docker Compose
๐ Seamless Calibre integration for EPUB3 books with audio synchronization
โก Fast & lightweight โ minimal dependencies
๐ How to Run
docker run -d \
--name simple-translate \
-p 5001:5001 \
alebast/simple-translate
Now your translation endpoint will be available at:
http://localhost:5001/translate?q=hello&sl=en&tl=esโ
๐ Calibre Setup
In Calibre, do:
Lookup/search selected word [L]
Add a new search engine:
Name: Simple Translate (RU โ ES)
URL: http://simple-translate:5001/translate?q={word}&sl=ru&tl=es
โ Parameters
Query Parameter Description Example
q The text or word to translate q=hello
sl Source language code sl=en
tl Target language code tl=es
๐ฆ Docker Compose Example
services:
simple-translate:
image: alebast/simple-translate
container_name: simple-translate
ports:
- "5001:5001"
restart: unless-stopped
Content type
Image
Digest
sha256:c5092ff3dโฆ
Size
29.8 MB
Last updated
about 1 month ago
docker pull alebast/simple-translate