Update 1
Google Translate API for .NET updated to 0.1.1
- Add more languages.
- Fixed some bugs.
Download: GoogleTranslateAPI_0.1.1.zip
Now this project is a part of the Google APIs for .NET which include more Google APIs such as Search API etc.
I will never update here anymore.
You can get the latest source code and released files at the Google APIs for .NET.
I’ve just released an updated CLS compatible version of Google Translated API there.
GoogleTranslateAPI_0.1.zip (CLS compatible version)
—————————————–
It’s my first Open Source project.
http://code.google.com/p/google-language-api-for-dotnet/
Provides a simple, unofficial, .NET Framework API for using Google Translate.
Support 20+ languages.
It can translate text or html format, and can detect the language of the given text.
Now implement all the function that google has launched.
Example :
class Example
{
public static void Main()
{
string text = "我喜欢跑步。";
string translated = Translator.Translate(text, Language.Chinese_Simplified, Language.English);
Console.WriteLine(translated);
// I like running.
}
}
More result:
| Arabic | صور اداة ترجمة. |
| Bulgarian | Google превежда инструмент. |
| Chinese Simplified | Google翻译工具。 |
| Chinese Traditional | Google翻譯工具。 |
| Croatian | Google Translate tool. |
| Czech | Google přeloží nástroje. |
| Danish | Google oversætter værktøj. |
| Dutch | Google vertalen tool. |
| English | Google translate tool. |
| Finnish | Google kääntää työkalu. |
| French | Outil de traduction Google. |
| German | Google Translate-Tool. |
| Greek | Google μεταφράζει εργαλείο. |
| Hindi | Google अनुवाद उपकरण है . |
| Italian | Google Translate strumento. |
| Japanese | Google翻訳ツールを使用します。 |
| Korean | 구글 번역 도구를합니다. |
| Norwegian | Google Translate. |
| Polish | Narzędzie Google tłumaczyć. |
| Portuguese | Traduz Google ferramenta. |
| Romanian | Google traduce instrument. |
| Russian | Google переводит инструмент. |
| Spanish | Traductor Google herramienta. |
| Swedish | Google översätter verktyg |
You can download here: GoogleTranslateAPI_0.1.zip
June 10, 2008 at 4:21 pm |
I tried this in a C# project and it worked great. The translate() function is not accessible in VB.NET however. When I use the exact same call as I did in C#, I am told: ‘Translate’ is ambiguous because multiple kinds of members with this name exist in class ‘Google.API.Translate.Translator’.
June 11, 2008 at 1:36 am |
There’s a CLSCompliant version.
Tell me if anyone want it.
email:iron9light#gmail.com
Change the # => @ in the email address above.
June 13, 2008 at 6:40 am |
[...] Iron9light’s Tech Weblog Just another WordPress.com weblog « Google Translate API for .NET 0.1 Release! [...]
August 7, 2008 at 5:04 pm |
I get the same as BK.
‘Language’ is ambiguous in the namespace ‘Google.API’.
August 7, 2008 at 5:27 pm |
Now this project is a part of the Google APIs for .NET(http://code.google.com/p/google-api-for-dotnet/) which include more Google APIs such as Search API etc.
I will never update here anymore.
You can get the latest source code and released files at the Google APIs for .NET.
I’ve just released an updated CLS compatible version of Google Translated API there.
August 9, 2008 at 6:04 am |
Hi
thanks 4 the translate API; i’ve been strugling to do the same thing with the webclient; simple can get the encoding right. I have made a change to
you’re source; makeing GetLanguage() and GetLanguageCode() public. Which would be nice if you could change. Other than that brilliant.
August 9, 2008 at 11:57 am |
To Paul,
Thanks for your advice.
As a software package, you always need to consider which one will be explicit or not. This is a problem.
Here, I made them invisible cause I don’t think other one will use them directly.
Luckily, it’s open source, and it’s under MIT.
You can change it as you wish. Yes, you can.
September 13, 2008 at 7:17 am |
What I have to do to make in work in Web Application for Asp.net 2.0. Is it possible?
September 13, 2008 at 10:53 am |
To Tarik:
1. Install .NET 3.5 (NOT update your ASP.NET project).
2. Put the two dll files into the app’s folder.
3. Add reference to “GoogleTranslateAPI.dll”
4. Using the three static methods in Translator to do anything you want.
December 10, 2008 at 10:42 pm |
Hi Great thing this, i would like to incorporate it into my free tools at my web address, http://www.chineselearners.co.uk
i was wondering if you could implement a dictionary style interface as well as the translate, i know if you type something in google it will come back with whether it is noun verb etc and give example sentences.
Please try my tools and let me know what you think, there are a few bugs but am working on them when i get chance.
Cheers Mo
December 11, 2008 at 12:48 pm |
Hi mo,
Do you mean http://www.google.com/dictionary ?
It seems google do not open it’s dictionary API yet.
I’ve sent you a mail.
December 16, 2008 at 11:37 am |
Hii,
I have been using translater API using ASP .net 3.5.
For this I am getting following exception.Also got some security exception. Basically I am not very good in .net as Java Developer.
So I tried to run your API using .Net and then intigrate it in Java.
Exception:
A first chance exception of type ‘Google.API.GoogleAPIException occurred in GoogleTranslateAPI.dll
December 16, 2008 at 1:54 pm |
I need more detail of this exception (inner exception and others).
If you just use it on your web page, use Google’s official javascript api directly.
December 17, 2008 at 1:18 pm |
Thanks a lot. I have solved exceptions and code working file..
Now I have wrapped this dll with another dll (which internally calls googles translators dll). This dll integrated with java program using Java native Interfaces(JNI). Then when java program runs it gives this exception ..
The specified procedure could not be found in Dll.
For doing this I have used C#.
December 22, 2008 at 1:55 pm |
I have solved the problem by using Googles Java based Translate API.
Dinesh Chothe
February 18, 2009 at 1:33 pm |
kindly send an sample program how to use this translator in asp.net 3.5 or asp.net mvc
thanks in advance
senthil
February 19, 2009 at 12:38 pm |
Just some static methods.
There’re some example in the doc.
If you use it for your web ui, you should use the google javascript api directly, especially for your asp.net mvc.
March 4, 2009 at 9:55 am |
hi iron9light,
send me an example using google translator in asp.net
thanks in advance
senthil
March 22, 2009 at 8:18 am |
[...] Indeed, 99+% of source have been finished when I release the Google Search API for .NET 0.1 and Google Translate API for .NET 0.1.1. [...]
July 11, 2009 at 5:55 pm |
Hey, Good work. when i’m trying to translate from persian to any language or to Persian from any language, it says “Can not translate this language to “Persian”".
this is because you ar not support persian language in this api or …?
July 23, 2009 at 9:33 am |
Fixed in v0.3 alpha. Check it out.
August 9, 2009 at 4:48 pm |
Hi, it is posible to make it support for .Net Framework 2 instead of 3.5?
August 10, 2009 at 5:03 am |
There’s no good lib 4 JSON on .NET 2.0, so sorry.