DEV Community

Cover image for I made BookTr: side-by-side translate app
Andrew Erlikh
Andrew Erlikh

Posted on

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
Enter fullscreen mode Exit fullscreen mode
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
Enter fullscreen mode Exit fullscreen mode

Or use docker-compose.yml

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post