A homemade solution for translating subtitles on Swedish Television (SVT).
The project is initially geared towards Swedish -> English translation, but can be adapted to target other languages supported by LibreTranslate.
The project has three parts:
- Remote translations server
- Local proxy server (optional)
- Browser script
You'll need to set up an instance of LibreTranslate to handle the translation. The easiest way to do this is using Docker. If you're only planning on running translations on your own computer, you can run it locally in Docker. Otherwise use a cloud solution to host the translation server + local proxy server.
Instructions for setting up LibreTranslate can be found on the LibreTranslate site or GitHub.
This step is optional and only required if running a remote/cloud based Translation service.
In the file localServer.py
, you'll need to change the url
variable inside the function make_translation_request
to point to your remote server.
The script to run can be found in browserScript.js
.
Make sure that the port (and host) are correctly configured inside the translate
function, depending on your setup.
Once you've configured the above, you can get instructions for how to watch by launching index.html
.