UlionTse / translators

🌏🌍🌎Translators🌎🌍🌏 is a library that aims to bring free, multiple, enjoyable translations to individuals and students in Python. Translators是一个旨在用Python为个人和学生带来免费、多样、愉快翻译的库。
https://pypi.org/project/translators/
GNU General Public License v3.0
1.62k stars 189 forks source link

[Feature]: Details of language supported exceptions #113

Closed zhaxnb closed 1 year ago

zhaxnb commented 1 year ago

Expect to happened

I need more details about the language supported exception. I use caiyun translator to translate ja to en, but translator doesn't support it, however output exceptions is "en" to "zh" is not supported, but i don't know which language i can use as the target language. image

Expected APP Version

a future version

Expected Python Version

=3.6 (Default)

Expected Runtime Environment

NoArch (Default)

Country/Region

Japan

Expected Output

translators.server.TranslatorError: Unsupported translation: from [ja] to [en]! support from ja to self.language_map.get(from_language, [])

Code of Conduct

UlionTse commented 1 year ago
import translators.server as tss

print(tss.caiyun('你好'))
print(tss._caiyun.language_map)