question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Translations from German to English generate errors

See original GitHub issue

Hello,

we use version 1.0.4.

If we try to translate “Dog” from english to german like this …

var translator = new Translator(Settings.DeeplTranslatorTextKey); TextResult textResult = await translator.TranslateTextAsync(“Dog”, LanguageCode.EnglishAmerican, LanguageCode.German);

… we get the following error:

Bad request, message: Value for ‘source_lang’ not supported.

at DeepL.Internal.DeepLClient.<CheckStatusCodeAsync>d__10.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DeepL.Translator.<TranslateTextAsync>d__8.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at DeepL.Translator.<TranslateTextAsync>d__9.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()

If we try to translate “Hund” from german to english, everything works fine.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
datan0stracommented, Jan 28, 2022

Thank you for your quick reply!

Now I understood the trick: The source language must be LanguageCode.English and must not be LanguageCode.EnglishAmerican or LanguageCode.EnglishBritish, while the target language must be LanguageCode.EnglishAmerican or LanguageCode.EnglishBritish but must not be LanguageCode.English, otherwise it will generate the following error message: targetLanguageCode=“en” is deprecated, please use “en-GB” or “en-US” instead.

Thanks for the help!

0reactions
gregzhadkocommented, May 27, 2023

Hi @daniel-jones-deepl, I have tested it on my end, and unfortunately, I couldn’t find any documentation related to Language enum. I have thoroughly examined the source code by decompiling and even checked the IDE (Rider), but to no avail. Do you think it’s possible that the documentation got lost during the Nuget building process?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Horrors of Proofreading: Top ten German to English ...
From §ection to Imprint, a list of my "favourite" 10 common mistakes in German to English translation with some less-than-understanding commentary. Enjoy!
Read more >
Translation Horrors: Top 3 German to English Errors ...
In this article, we have mentioned top 3 German to English errors that translators can easily avoid while translating documents.
Read more >
Top 4 German to English Translation Errors
1. The use of the § symbol ... This is probably the most common error that you'll find even in decent translations. The...
Read more >
5 embarrassing mistakes in German translation
We've all struggled at some point trying to perfectly translate something from German to English. And sure, we've made mistakes.
Read more >
Translation error in the German language pack | Vivaldi Forum
Hi Vivaldi Team The German language pack has been translation errors since ... This error emerge via context menu in multiple situations.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found