File size: 270 Bytes
fc97eea
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from libretranslatepy import LibreTranslateAPI

lt = LibreTranslateAPI("https://translate.argosopentech.com/")

attempt_input = input("Enter input:")
detected = lt.detect(attempt_input)[0]['language']
print(detected)
print(lt.translate(attempt_input, detected, "en"))