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

feature: translate a text to multiple Languages #35

Closed
idirbfs opened this issue Aug 10, 2023 · 2 comments
Closed

feature: translate a text to multiple Languages #35

idirbfs opened this issue Aug 10, 2023 · 2 comments

Comments

@idirbfs
Copy link

idirbfs commented Aug 10, 2023

Hello,
Is there a way to translate a text to multiple languages?
like this:
Translator.translateText(text, null, targetLangs as deepl.TargetLanguageCode[]);

@JanEbbing
Copy link
Member

Hi, you would need to make multiple translateText calls to get the result in different languages.

const results = await Promise.all(targetLangs.map((targetLang) => Translator.translateText(text, null, targetLang)));

@idirbfs
Copy link
Author

idirbfs commented Aug 10, 2023

thank you!

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

2 participants