Introduction
This tip demonstrates how to implement Google translate in your C# application without purchasing its API.
Points of Interest are:
- We are using Google translate service so an internet connection is required.
- We are sending HTTP requests like a browser does.
- We are parsing the output and displaying result.
Features of Application are:
- Grabs input string from clipboard as soon as application starts or its window is actived.
- Language change option is available in context menu on each
textbox
. - Translate while typing.
- Shows single or all meanings of given word.
- Shows meaning with corresponding sentence surrounded with
[ ]
.
Snapshots
Using the Code
I am using http://translate.google.com/translate_a url.
Points of Interest
I have used some portion of code from http://weblog.west-wind.com/posts/2011/Aug/06/Translating-with-Google-Translate-without-API-and-C-Code.
This code is edited by me and more features are added to make a handy translator. I hope this will help readers.
History
- Version 1.0 -
GoogleTranslateDesk