Although the Vivaldi web browser has a handy language translation tool built in, I'm not keen on having to post every snippet I want to translate out to the Internet (and rely on someone else's CPU time and goodwill).
LibreTranslate - libretranslate.com - turned out to be easy to set up. It's free, open source, and you can run it on your own hardware.
There are instructions on their GitHub page, but I just set up an LXC based on Debian 12 with 2GB RAM and 30GB disk, added a Python venv, and ran "pip install libretranslate". After downloading everything, it occupied 4.6GB of disk for the code and 8.7GB for the data. Then, I gave it a systemd service file to make it start on boot, and stuck HAProxy in front of it along with a self-signed certificate.
So now I have my own offline translation tool and thanks to a trivial shell script wrapper for the API (using curl), I can translate short snippets from the command line, too. I recommend trying it out if you've got a bit of disk and RAM to spare.
#FOSS #Linux #InternationalTranslationDay #curl
LibreTranslate - Free and Open Source Machine Translation API
Free and Open Source Machine Translation API. Self-hosted, offline capable and easy to setup. Run your own API server in just a few minutes.libretranslate.com
Andrew Wood
Als Antwort auf Andrew Wood • • •Here is a tool to annotate PO translation files using LibreTranslate, so that project maintainers can make sure the human-provided translations look plausible, even when they don't speak the target languages.
codeberg.org/a-j-wood/po-trans…
I developed this to be able to vet submitted translations for Pipe Viewer and other projects, to have some confidence that the submitter understood each string they translated in the context I'd intended, and to limit the likelihood of malicious mistranslations or vandalism.
It relies on LibreTranslate, but the project README outlines how to quickly install that on your local machine.
The project is hosted on the @Codeberg platform and was developed with their Translathon (codeberg.org/codeberg/translat…) in mind.
#FOSS #FLOSS #Translation #i18n
po-translation-auto-assistant
Codeberg.org