Hover translate is a vs code extension to translate text on hover. Currently, this plugin uses Yandex translate and requires a yandex api key which you can obtain for free (https://tech.yandex.com/translate/). Support for google translate api may be added in the future.
add key to hover translate settings (Yandex Api Key)
Extension Settings
This extension contributes the following settings:
hovertranslate.enableExtension: enable/disable this extension
hovertranslate.yandexApiKey: Yandex translate api key
hovertranslate.hideSameLangHover: Do not show tooltip if the detected language of a word is the same as your translate to
hovertranslate.translateFrom: Language to translate text from
Options
Auto Detect Language
Arabic
German
English
Spanish
French
Italian
Japanese
Korean
Russian
Chinese
hovertranslate.translateTo: Language to translate text to
Options
Arabic
German
English
Spanish
French
Italian
Japanese
Korean
Russian
Chinese
Note: This extension can support all language Yandex translate supports. This set was chosen for now. Submit a pr or open an issue if you want another one. (https://github.com/marclanepitt/hovertranslate)
Known Issues
Translating entire sentences can be difficult because the extension uses spaces a delimiter. One hack to translate an entire sentence is to highlight it and then hover over the space to the right of it