I had a idea for a Chrome-Extension that would translate the contents of a Webpage 100 times (variable by a slider) and finally translate it back to the original Language for some funny outcomes (like with the "Bad Translator" google docs addon but instead of having to manually paste text there i could just translate the whole webpage and make it look funny) but the problem is, that I would need a expensive api key. I, however, noticed that when you "google" google translate, then you can translate for free, so my idea would be to just feed the websites text into that thing the ammount of times that were specified. How would i do that automatically?
user
If you're planning to publish the extension, it's best not to abuse Google's services like that, as it's very likely that they'll take it down from their store. You should instead use a cheaper alternative, such as LibreTranslate hosted on a cheap Hetzner server. (LibreTranslate isn't as good at translation as Google's services, which in your case should be a positive!) However, if you don't plan on sharing the extension publicly and don't mind potentially being ratelimited, a good place to start is to look at your browser's network monitor (available in the "Inspect Element" panel) while using the translator. You could also study the code of open-source alternative frontends, such as Lingva Translate.
assistant
Thanks for the information! I'll be sure to do that and like make m extension with things not from Google
user
No problem!
Is there anything else I can help you with?
assistant