File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
YAFNET.LanguageManager/YAFNET.LanguageManager Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -426,6 +426,12 @@ private static async Task AutoTranslateWithGoogleFreeAsync(
426426 }
427427 }
428428
429+ /// <summary>
430+ /// Translates the with google asynchronous.
431+ /// </summary>
432+ /// <param name="inputToTranslate">The input to translate.</param>
433+ /// <param name="targetLanguageCode">The target language code.</param>
434+ /// <returns>System.Threading.Tasks.Task<System.String>.</returns>
429435 private static async Task < string > TranslateWithGoogleAsync ( string inputToTranslate , string targetLanguageCode )
430436 {
431437 string result ;
@@ -437,7 +443,7 @@ private static async Task<string> TranslateWithGoogleAsync(string inputToTransla
437443 client . DefaultRequestHeaders . UserAgent . ParseAdd ( "YAF.NET" ) ;
438444
439445 var url =
440- $ "https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl={ inputToTranslate } &dt=t&q={ HttpUtility . HtmlEncode ( targetLanguageCode ) } ";
446+ $ "https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl={ targetLanguageCode } &dt=t&q={ HttpUtility . HtmlEncode ( inputToTranslate ) } ";
441447
442448 var json = await client . GetFromJsonAsync < dynamic [ ] > ( url ) ;
443449
You can’t perform that action at this time.
0 commit comments