You can write VideoLAN VLC player's extensions in LUA programming language.
Extensions are in Videolan\VLC directory lua\extensions directory.
This is a modified extension to automatically download subtitles.
Download extension
Save extension (the code/text file) as AutoSubtitles.lua in the extensions directory mentioned above.
Will add more languages upon request.
Currently this extension is intended for personal use.
Screenshots: