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

The en to zh translation is not working #363

Open
yingshaoxo opened this issue Sep 11, 2023 · 2 comments
Open

The en to zh translation is not working #363

yingshaoxo opened this issue Sep 11, 2023 · 2 comments

Comments

@yingshaoxo
Copy link

import argostranslate.package
import argostranslate.translate

from_code = "en"
to_code = "zh"

argostranslate.package.update_package_index()
available_packages = argostranslate.package.get_available_packages()
package_to_install = next(
    filter(
        lambda x: x.from_code == from_code and x.to_code == to_code, available_packages
    )
)
argostranslate.package.install_from_path(package_to_install.download())

# Translate
translatedText = argostranslate.translate.translate("Hello World", from_code, to_code)
print(translatedText)
# '¡Hola Mundo!'

It will still return 'Hello World'

@yowayimono
Copy link

I also encountered this problem, very distressed

@jason-ni
Copy link

Maybe you should try the latest version. As I tried it today and it works fine.

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

3 participants