I made BookTr: side-by-side translate app

BookTr is a tool for reading texts in foreign languages. Features: Uses LibreTranslate API, but other APIs can be added later Side-by-side translation, aligned paragraphs Can save translations in json format Select word to see its translation, double click to translate every word in a sentence Fully Self-Hosted, can work offline Reasons for creating BookTr The best way to learn a foreign language for me is by reading books in it. I tried doing it with Google Translate and other similar online tools, it's been frustrating: the interface is not suitable for long texts. So, I decided to create my own)). I am open to suggestions about adding other translation APIs, the only limit is - no paid ones. Only free online or self-hosted. Quick start (Docker) First, run LibreTranslate container. It will take some time (~20 minutes) and resources (~1Gb memory, 10+Gb disk). When you see it's web interface at port 5000, move on to installing BookTr. docker run --name ltr \ -p 5000:5000 \ libretranslate/libretranslate docker run --name BookTr \ -e "TZ=$YOURTIMEZONE" \ # your TZ here -e "LTRPATH=http://$YOURADDRESS:5000" \ # LibreTranslate URL -v ~/.dockerdata/BookTr:/data/BookTr \ -p 8856:8856 \ aceberg/BookTr Or use docker-compose.yml

Mar 1, 2025 - 16:32
 0
I made BookTr: side-by-side translate app

BookTr is a tool for reading texts in foreign languages. Features:

  • Uses LibreTranslate API, but other APIs can be added later
  • Side-by-side translation, aligned paragraphs
  • Can save translations in json format
  • Select word to see its translation, double click to translate every word in a sentence
  • Fully Self-Hosted, can work offline

Screenshot

Reasons for creating BookTr

The best way to learn a foreign language for me is by reading books in it. I tried doing it with Google Translate and other similar online tools, it's been frustrating: the interface is not suitable for long texts.

So, I decided to create my own)).

I am open to suggestions about adding other translation APIs, the only limit is - no paid ones. Only free online or self-hosted.

Quick start (Docker)

First, run LibreTranslate container. It will take some time (~20 minutes) and resources (~1Gb memory, 10+Gb disk). When you see it's web interface at port 5000, move on to installing BookTr.

docker run --name ltr \
    -p 5000:5000 \
  libretranslate/libretranslate
docker run --name BookTr \
    -e "TZ=$YOURTIMEZONE" \                  # your TZ here
    -e "LTRPATH=http://$YOURADDRESS:5000" \  # LibreTranslate URL
    -v ~/.dockerdata/BookTr:/data/BookTr  \ 
    -p 8856:8856 \
  aceberg/BookTr

Or use docker-compose.yml