tags:

views:

2077

answers:

4

Hi guys. I have to translate some text with google's translate service. All code I've founded don't work. I think after changing that service. Maybe someone has working code. I'll be very glad. Thanks

+10  A: 

See if this works for you

google-language-api-for-dotnet

http://code.google.com/p/google-language-api-for-dotnet/

Translate text in C#, using Google Translate

http://dnknormark.net/post/Translate-text-in-C-using-Google-Translate.aspx

Google Translator

http://www.codeproject.com/KB/IP/GoogleTranslator.aspx

Translate your text using Google Api's

http://blogs.msdn.com/shahpiyush/archive/2007/06/09/3188246.aspx

Calling Google Ajax Language API for Translation and Language Detection from C#

http://www.esotericdelights.com/post/2008/11/Calling-Google-Ajax-Language-API-for-Translation-and-Language-Detection-from-C.aspx

Translation Web Service in C#

http://www.codeproject.com/KB/cpp/translation.aspx

Using Google's Translation API from .NET

http://www.reimers.dk/blogs/jacob_reimers_weblog/archive/2008/06/18/using-google-s-translation-api-from-net.aspx

James Campbell
I can use google :) I tried this code before. Doesn't work for me.
Ockonal
@Ockonal, maybe you should give some more information about what doesn't work for you.
JSBangs
@Ockonal There is no way all the code referenced doesn't work. What exactly is the issue you are having?
James Campbell
+4  A: 
Shane Fulmer
A: 

so it means that I always have to update my program when the page changes? or can i just have the ip address of that url instead? becuase as for what I know the url does not change?

Abu Sharaffi
+2  A: 

Google Translate Kit, an open source library http://ggltranslate.codeplex.com/

Translator gt = new Translator();
/*using cache*/
DemoWriter dw = new DemoWriter();
gt.KeyGen = new SimpleKeyGen();
gt.CacheManager = new SimleCacheManager();
gt.Writer = dw;
Translator.TranslatedPost post = gt.GetTranslatedPost("Hello world", LanguageConst.ENGLISH, LanguageConst.CHINESE);
Translator.TranslatedPost post2 = gt.GetTranslatedPost("I'm Jeff", LanguageConst.ENGLISH, LanguageConst.CHINESE);
this.result.InnerHtml = "<p>" + post.text +post2.text+ "</p>";
dw.WriteToFile();
jebberwocky