Gesture translate

Hi!
I had the idea to make a plugin to translate individual parts of the page on the fly, rather than the entire page.
The idea is that we translate a separate div that the user needs. In the plugin settings, you set your native language and preferred one. When a user wants to translate a column / block, he moves the cursor to the right edge of the desired text, here the plugin pushes the “translate block” button from behind the edge of the div, in the manner of gesture functions on smartphones, for example, “Delete” or “Archive”. And when this button is pressed, the edge moves further and overlaps this block with the text with the block translated, for example, Google Translate. And if the text is in the user’s native language, it translates to the reverse. That is, if a user is from Germany and reads in German, then he can set up an English translation, or disable such a function.
Also, in the above block, you can set the language settings so that a person can change it without opening the settings.
In fact, this is the translation of the desired paragraph by swipe from the right edge, but with the help of the mouse
I’d like to make this plugin myself, but I’m only familiar with HTML/CSS. But I am happy to participate in the development of ideologically