deep-translator
deep-translator copied to clipboard
Get the source language when translating with "auto" on Google Translate
I need to know what the original language was for the text that got translated over Google Translate, could this be added to this library?
Something like .translate_with_metadata() returning both the text and source language, and maybe even some extra data if the Google Translate API gives them to you.
My previous library for translation used to do this and got abandoned (googletrans), I would appreciate having it here.
It looks like the website used to provide Google Translate translation does not display information about what language has been automatically detected. It's displayed on the main Google Translate website but there this information is obfuscated in the webpage source, so it'll be way more complicated to scrape that information.
I've tried to implement that, but I felt like I had to create the new translator scraper from scratch.