Skip to content

Commit cc01e4a

Browse files
Add googletrans
The free & unlimited API of google-translator
1 parent 64db478 commit cc01e4a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

_googletrans.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from googletrans import Translator # pip install googletrans
2+
3+
translator = Translator()
4+
translation = translator.translate("سلام به همه")
5+
print(f"{translation.origin} ({translation.src}) --> {translation.text} ({translation.dest})")
6+
7+
# translator.detect(text) # determines the language

0 commit comments

Comments
 (0)