Open GoogleCodeExporter opened 9 years ago
i have the same problem Please answer !
Original comment by Al.Waz...@gmail.com
on 12 Aug 2010 at 2:55
This isn't a defect. Read the exception. It says Invalid Translation Language
Pair.
That means you can't translate from that source to that destination.
E.g. You can't do Swahili to Uzbek.
You need to look for this error and deal with it as appropriate in your code
Original comment by t3roar@gmail.com
on 6 Jan 2011 at 12:18
This IS a defect. Also the sample code does not work, Translating from English
to German for instance is completely valid.
Translate(string, string, string) does not work at all with
client.Translate("word", Language.English, Language.German) as the Language
objects aren't strings either.
Original comment by aa...@muldr.com
on 8 Jan 2011 at 3:47
I also have to say that this is a problem.
TranslateClient client = new TranslateClient("");
translated = client.Translate(str, Language.English, Language.German);
is not valid because the Translate method only accepts strings for all
arguments, not Language objects.
trying
TranslateClient client = new TranslateClient("");
translated = client.Translate(str, Convert.ToString(Language.English),
Convert.ToString(Language.German));
Does not work either as you end up getting the error about invalid language
pairs.
Types do not match up between the method and the Language objects, and also
doing the next logical thing of Convert.ToString on the Language objects does
not work...
I am unable to use this API as it currently is.
Original comment by magus.x...@gmail.com
on 7 Feb 2011 at 3:06
I have the exact problem translating from Greek to English
Original comment by pap...@gmail.com
on 9 Feb 2011 at 1:33
Ok Found the porblem
There is a bug in the api.
Translate method of the TranslateClient accepts strings for language
definition.
However
Google.API.Translate.Language.Greek is enumeration that is not implicitly
converted to the correct literal.
The solution was to give the correct strings manually:
String Text = translateClient.Translate("Έλα Μάνα", "el", "en")
regs
Original comment by pap...@gmail.com
on 9 Feb 2011 at 1:42
I'm not able to convert Indian language other than hindi.
Actual problem is Google.API.Translate.Language.Tamil.IsTranslatable is default
false.
how can i made true
Original comment by kirubamc...@gmail.com
on 25 Apr 2011 at 9:08
Hi friends,
here is the code I used to translate English to Oriya
string str = "I belong to orissa";
Google.API.Translate.TranslateClient client = new Google.API.Translate.TranslateClient("http://www.google.co.in");
str = client.Translate(str, Google.API.Translate.Language.English.ToString(), Google.API.Translate.Language.Hindi.ToString());
Response.Write(str);
but i got the error stating invalid language pair.
Please let me know how to solve the issue
Original comment by mahapatr...@gmail.com
on 6 Dec 2011 at 6:09
Original issue reported on code.google.com by
sreeniva...@gmail.com
on 18 Jun 2010 at 7:06