VLC Lua extension for translating subtitles in realtime via online translators. The purpose of this extension is to enforce learning of foreign languages. Just watch movies in their original language with their subtitles, and get the translation on the fly when necessary.
The only supported format is SRT subtitle. The subtitle file name should be the same as movie filename but with ".srt" extension. This is due to the lack of VLC API, sorry. Internet connection.
Put the file in the VLC subdir /lua/extensions, by default:
- Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\
- Windows (current user): %APPDATA%\VLC\lua\extensions\
- Linux (all users): /usr/share/vlc/lua/extensions/
- Linux (current user): ~/.local/share/vlc/lua/extensions/
- Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/extensions/
Create directories if they don't exist.
Restart the VLC.
Enable the extension by going to the "View" menu and selecting it.
When in pause press F12 to translate current subtitle.
You can tweak some params in the beginning of the file:
Languages:
SOURCE_LANG = "en"
TARGET_LANG = "ru"
Translation engines: yandex, or google
translator = "yandex"
OSD:
osd_duration = 10 osd_position = "top-left"