Last active
March 6, 2024 21:10
-
-
Save cd060/e5a940eb3b1ea5a374e556e507b09552 to your computer and use it in GitHub Desktop.
translates strings to english
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import googletrans | |
| from googletrans import * | |
| def text_to_en(text): | |
| translator = googletrans.Translator() | |
| translation = translator.translate(text, dest='en') | |
| return translation.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment