wmr049 / google-api-for-dotnet

Automatically exported from code.google.com/p/google-api-for-dotnet
0 stars 0 forks source link

TranslateAndDetect switches input and output languages #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using Google.API.Translate.Translator.TranslateAndDetect()

The input and output languages languages are switched.

I don't know why an input language is required anyway.

Original issue reported on code.google.com by atre...@gmail.com on 18 Feb 2009 at 10:51

GoogleCodeExporter commented 9 years ago
public static string TranslateAndDetect(string text, Language to, out Language 
from)

You means this one?

The third parameter is marked by "out".

public static string YourTranslate(string text, Language to)
{
    Language from;
    return TranslateAndDetect(text, to, out from);
}

I'm not sure whether I need add the method above in my project.

Original comment by iron9li...@gmail.com on 1 Mar 2009 at 8:00