selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

TransLite logo

Self-host TransLite

Minimal PHP frontend for four translation engines

BetaOpen SourceUnlicense
Docker ComposeCompose file & guide
docker compose up -d
Updated3 weeks ago
Setup difficultyEasy
Port
8080 (HTTP listener of the TransLite container)
Docker
git.bloat.cat/gospodin/translite

What is TransLite?

TransLite puts a single plain translation form in front of Google Translate, DeepL, Yandex and DuckDuckGo Translate, so you can use those engines without visiting their sites. Visitors pick one engine or turn on several at once, choose source and target languages from long per-engine lists (autodetect is available on the source side), swap the two directions, and read the result in a second text area with audio buttons next to each side. JavaScript stays off unless the user opts in, which then gives automatic text-area resizing and swap/clear without a page reload; switching to POST requests lifts the form's 2000-character GET limit for longer input, at the cost of translation links no longer carrying the text. Accesskeys cover both language lists, both text areas, both audio buttons, swap, translate and clear. A settings page holds engine, language-selector style and default-language choices with Save and Reset. Instance owners can set default source and target languages and the GET form length through environment variables. Self-hosting means either running the published container image behind Docker Compose or installing the PHP files yourself with php-fpm and a few extensions, plus a web server. There is no account system or login; the code is published under the Unlicense, and the public instance at tl.bloat.cat shows what you get.

TransLite alternatives

Should you self-host TransLite?

TransLite scores 49/100 on selfhost.directory (how scoring works) and ranks #8 of 11 in Translation.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is Unlicense-licensed.

Its closest alternative on selfhost.directory is LibreTranslate (79/100, 17 771 stars). It scores higher overall, so compare the two before you pick. See TransLite vs LibreTranslate side by side.

Features

  • Audio playback buttons
  • Configurable form length limit
  • Keyboard Shortcuts
  • Language autodetection
  • Multiple translation engines
  • Opt-in JavaScript
  • Per-user settings page
  • POST translation mode

How to install TransLite

Install TransLite with Docker Compose

Environment variables
MAX_LINK_LENGTH, PREF_SL, PREF_TL

Copy compose.example.yaml to compose.yaml, edit it to suit your needs and run docker compose up -d.

Image published at git.bloat.cat/gospodin/translite; commit-linked tags let you revert a broken image.

How to configure TransLite

  • MAX_LINK_LENGTH600Sets the GET form's text limit (the form's maxlength, not a server-side request limit); unset or invalid values use the default.

    values: positive integer

  • PREF_SLautoDefault source language for all engines (prefSl in the code); unset or empty keeps auto. User-saved preferences override it.

    values: language codes supported by the enabled engines; auto only for source

  • PREF_TLenDefault target language for all engines (prefTl in the code); unset or empty keeps en. User-saved preferences override it.

    values: language codes supported by the enabled engines

More in Translation

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…