We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from translatepy.utils.request import Request from translatepy.translators.google import GoogleTranslateV1 proxy_request = Request(proxy_urls=["127.0.0.1:10809"]) translator = GoogleTranslateV1(request=proxy_request) print(translator.translate(txt, Language("zh-cn")).result)
With above code, exception occurs:
translatepy.exceptions.UnknownLanguage: Couldn't recognize the given language (zh-cn) Did you mean: czech (Similarity: 67.61%)?
I tried again with "zh-CN" or "Chinese", none of them worked!
The text was updated successfully, but these errors were encountered:
Try specify "zho", this is a workaround for this unfixed bug.
Upd: "Chinese" also works
Sorry, something went wrong.
Thank you for reporting this issue @xrkk
Indeed, zh-CN wasn't in the CODES list.
zh-CN
CODES
199c566 should fix your problem!
Yes, it worked! Thank you for your good work. Closing this issue.
No branches or pull requests
With above code, exception occurs:
I tried again with "zh-CN" or "Chinese", none of them worked!
The text was updated successfully, but these errors were encountered: