Andrew Wood<p>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).</p><p>LibreTranslate - <a href="https://libretranslate.com" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="">libretranslate.com</span><span class="invisible"></span></a> - turned out to be easy to set up. It's free, open source, and you can run it on your own hardware.</p><p>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.</p><p>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.</p><p><a href="https://social.vivaldi.net/tags/FOSS" class="mention hashtag" rel="tag">#<span>FOSS</span></a> <a href="https://social.vivaldi.net/tags/Linux" class="mention hashtag" rel="tag">#<span>Linux</span></a> <a href="https://social.vivaldi.net/tags/InternationalTranslationDay" class="mention hashtag" rel="tag">#<span>InternationalTranslationDay</span></a> <a href="https://social.vivaldi.net/tags/curl" class="mention hashtag" rel="tag">#<span>curl</span></a></p>