Resolve "Component: Translation" #73

Merged
thorsten merged 23 commits from 12-component-translation into main 2022-09-21 20:53:39 +00:00
Showing only changes of commit a179e8dd23 - Show all commits

View File

@ -52,6 +52,9 @@ public static class DeepL
var sourceCultureIndex = await AppSettings.GetDeepLSourceCultureIndex();
var sourceCulture = await AppSettings.GetCultureCode(sourceCultureIndex);
// In case of the source culture, we cannot specify the region, so we need to remove it:
sourceCulture = sourceCulture.Split('-')[0];
using var deepl = new Translator(deepLAPIKey);
var translation = await deepl.TranslateTextAsync(text, sourceCulture, targetCulture);