Project URL: https://github.com/fzdwx/popup-translation
The basic principle is to open a webview window using wry, then open the webpage of a translation platform to translate the content, and use JavaScript code to block unnecessary content, focusing on the translated content itself.
Currently, the content to be translated is obtained from the clipboard (or you can directly specify fanyi hello
). On Linux (x11), it supports directly translating the selected content by the mouse (without the need to copy it to the clipboard).