Open yamanq opened 2 years ago
Thats a pretty cool idea! Are you working on that already? If so, open a draft PR and I might take a swing as well.
Thanks. I haven't started yet but I will put a comment here if I try to implement it.
general idea:
<html>
<body>
<p>
here be text
</p>
etc.
A couple more ideas on how to traverse the HTML, though they are untested:
find('text')
, which finds all "Text Blocks" (See "Text & Comments" tab).Another thing to consider is isolating the actual translation behavior to a protected function so that derivative classes can easily inherit and modify the translation service.
Instead of hammering public translators, it might make sense to spin up our own heroku-hosted version of the translator.
I also like the idea of making it a general function as soon as we worked it out :)
Bridge request
General information
This bridge is a FeedExpander that translates the title and content of the feed from one language to another. Additionally, parameters could be used to determine which translation service to be used (if multiple are implemented).
Host URI for the bridge (i.e.
https://github.com
): Depends on the translation service (LibreTranslate, Google Translate, and DeepL Translator are some that I found that can translate multiple languages).Which information would you like to see? Same as input feed, but with translated title and content. Importantly, outer HTML should not be mangled by the translation.
Options