15 lines
335 B
Python
15 lines
335 B
Python
|
import argostranslate.package
|
||
|
import argostranslate.translate
|
||
|
import sys
|
||
|
|
||
|
def translate():
|
||
|
message = sys.argv[1]
|
||
|
from_lang = sys.argv[2]
|
||
|
to_lang = sys.argv[3]
|
||
|
translation = argostranslate.translate.translate(message, from_lang, to_lang)
|
||
|
print(translation)
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
translate()
|