terryyin / translate-python

Online translation as a Python module & command line tool. No key, no authentication needed.
MIT License
724 stars 155 forks source link

Example in README doesn't work #75

Closed PJ-Finlay closed 3 years ago

PJ-Finlay commented 3 years ago

After installing from source:

(env) $ translate-cli -t zh "This is a pen."

Translation: '' IS AN INVALID SOURCE LANGUAGE . EXAMPLE: LANGPAIR=EN|IT USING 2 LETTER ISO OR RFC3066 LIKE ZH-CN. ALMOST ALL LANGUAGES SUPPORTED BUT SOME MAY HAVE NO CONTENT

translate-cli -f es -t zh "This is a pen." works though.

PJ-Finlay commented 3 years ago

I needed to configure in ~/.python-translate.cfg:

[DEFAULT]
from_lang = autodetect
to_lang = de
provider = mymemory
secret_access_key =