Skip to content
New issue

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

get_supported_languages only working for GoogleTranslator #254

Open
Khyretos opened this issue Jan 6, 2024 · 0 comments
Open

get_supported_languages only working for GoogleTranslator #254

Khyretos opened this issue Jan 6, 2024 · 0 comments

Comments

@Khyretos
Copy link

Khyretos commented Jan 6, 2024

  • deep_translator version: 1.11.4
  • Python version: 3.11.4 x64 bit
  • Operating System: windows 10

Description

I want to know which languages are supported in each service, i expect every service to return the languages they support.

What I Did

from deep_translator import (GoogleTranslator,
                             ChatGptTranslator,
                             MicrosoftTranslator,
                             PonsTranslator,
                             LingueeTranslator,
                             MyMemoryTranslator,
                             YandexTranslator,
                             PapagoTranslator,
                             DeeplTranslator,
                             QcriTranslator,
                             single_detection,
                             batch_detection)


print("GoogleTranslator:")
google_list  = GoogleTranslator().get_supported_languages()
print(google_list)

print("ChatGptTranslator:")
google_list  = ChatGptTranslator().get_supported_languages()
print(google_list)

print("MyMemoryTranslator:")
mymemory_list  = MyMemoryTranslator().get_supported_languages()
print(mymemory_list)

print("MicrosoftTranslator:")
microsoft_list =  MicrosoftTranslator().get_supported_languages()
print(microsoft_list)

print("PonsTranslator:")
pons_list = PonsTranslator().get_supported_languages()
print(pons_list)

print("LingueeTranslator:")
linguee_list = LingueeTranslator().get_supported_languages()
print(linguee_list)

print("YandexTranslator:")
yandex_list = YandexTranslator().get_supported_languages()
print(yandex_list)

print("PapagoTranslator:")
papago_list = PapagoTranslator().get_supported_languages()
print(papago_list)

print("DeeplTranslator:")
deepl_list = DeeplTranslator().get_supported_languages()
print(deepl_list)

print("QcriTranslator:")
qcri_list = QcriTranslator().get_supported_languages()
print(qcri_list)

it crashes on everyone except google.

Did you make it general where you just need to send in the name of the language and deep_translator maps it automatically for each service?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant