i




 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Google Language (translation) APIs asp.net c#
07-11-2011, 03:18 PM
Post: #1
Google Language (translation) APIs asp.net c#
Introduction

The Google Language API Family consists of four powerful tools making it easier for you to communicate with users across the globe:

* Need to translate your website or application into one or more different languages? With Google Translate, you can dynamically translate text between thousands of language pairs.

* Wondering what "have a nice day" looks like written in Hindi? You can use Google Transliterate to transform a given written language into dozens of other scripts.

* Want to type in Hindi, but don't have a Hindi keyboard? With Google Virtual Keyboard, you can provide users with an on-screen keyboard layout native to one of dozens of available language scripts.

* Learning to read Arabic? You can use Google Diacritize to add diacritical marks to text, helping non-native speakers learn how to pronounce these words.


i have created a small asp.net project for translating from one language to another using Google Language apis.

Gapi.Net is a wrapper to implement Google Language api in c#/vb.net


Language API example:
Code:
System.Console.WriteLine("{0}", Translator.Translate("Ciao mondo", Language.Italian, Language.English));

In wrapper developer define enums for all languages. so our first step is to fill dropdownlist with languages for user ease to select the desire language for conversion.
Code:
ddl_langFrom.DataSource = Enum.GetValues(typeof(Language));
ddl_langFrom.DataBind();

because dropdownlist value return a string, but we need Language enum to execute the main Translator.Translate function, we first need to convert string to specified enum.
Code:
Language lngfrm = (Language)Enum.Parse(typeof(Language), ddl_langFrom.SelectedValue);

now simply pass these parameters to Translator.Translate function to get the desire results.

Please check the attached code for complete solution.

Requirements:
.NET Framework 2.0
Complying with Google Terms for using the Search API

[Image: 2rekvo1.png]

Note: if someone want to use this code, then please give a link back to dotnetobject.com.

All credit goes to the developer of gapidotnet




Attached File(s)
.rar  GoogleTrans.rar (Size: 33.26 KB / Downloads: 662)

[Image: 2604595733.png]
Quote
07-12-2011, 11:56 AM
Post: #2
RE: Google Language (translation) APIs asp.net c#
Wow what a tool. I am going to use it hereafter.
Quote
07-14-2011, 05:23 PM
Post: #3
RE: Google Language (translation) APIs asp.net c#
Thank you for sharing, I have been looking for a way to translate my pages!
Quote
07-14-2011, 06:00 PM
Post: #4
RE: Google Language (translation) APIs asp.net c#
@arachai: you can change your pages easily by using google apis, refer below link for solution
Inline language translation in asp.net

[Image: 2604595733.png]
Quote
09-01-2011, 03:48 PM
Post: #5
RE: Google Language (translation) APIs asp.net c#
Hello,

I have used this code but after 1 month i got a error-"ResponseStatus: 403, Reason: Suspected Terms of Service Abuse."
Please help me to solve this problem.
Quote
09-01-2011, 05:50 PM
Post: #6
RE: Google Language (translation) APIs asp.net c#
please read Google API terms and conditions carefully.
http://code.google.com/apis/websearch/terms.html


alternatively you can use Microsoft language translation APIs from following link
http://www.dotnetobject.com/showthread.php?tid=1723

[Image: 2604595733.png]
Quote
09-11-2011, 06:09 AM (This post was last modified: 09-11-2011 06:10 AM by dinesh123.)
Post: #7
RE: Google Language (translation) APIs asp.net c#
Thanks.
I have used second option.
Quote
07-16-2012, 08:24 AM
Post: #8
RE: Google Language (translation) APIs asp.net c#
Hi friends,

Attached GL program is not working.Now GL is paid service More info

http://www.netmagazine.com/tutorials/swi...translator
Quote
07-17-2012, 05:03 AM
Post: #9
RE: Google Language (translation) APIs asp.net c#
The implementation of Microsoft Translator is here
http://www.dotnetobject.com/showthread.php?tid=1723

[Image: 2604595733.png]
Quote
09-18-2012, 06:48 AM
Post: #10
RE: Google Language (translation) APIs asp.net c#
(07-17-2012 05:03 AM)nisar87 Wrote:  I getting this type of error . please resolve it
ResponseStatus: 403, Reason: Suspected Terms of Service Abuse. Please see http://code.google.com/apis/errors, Response data: {"responseData": null, "responseDetails": "Suspected Terms of Service Abuse. Please see http://code.google.com/apis/errors", "responseStatus": 403}
Quote
09-18-2012, 09:03 AM
Post: #11
RE: Google Language (translation) APIs asp.net c#
Do you ever able to run the code? are you are getting this error after using it for sometime, actually this issue is usually coming when try to use the google api in production level or calling the apis more than their limit.

please read Google API terms and conditions carefully.
http://code.google.com/apis/websearch/terms.html


alternatively you can use Microsoft language translation APIs from following link
http://www.dotnetobject.com/showthread.php?tid=1723

[Image: 2604595733.png]
Quote
01-28-2013, 10:05 AM
Post: #12
Sad RE: Google Language (translation) APIs asp.net c#
I am using GoogleTrans.rar file as it is..
but I am getting an error :"The remote server returned an error: (407) Proxy Authentication Required. "
I didn't get that why this error occurs..
Please help me out ..for this issue.
Quote


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  Inline language translation in asp.net nisar87 2 3,575 02-06-2014 06:35 AM
Last Post: poorna
  Text to speech recognition in asp.net using Microsoft APIs nisar87 0 3,506 12-09-2011 07:34 PM
Last Post: nisar87
  Microsoft Language Translation API implementation asp.net c# nisar87 3 10,201 11-15-2011 05:15 AM
Last Post: nisar87
  IP to location + google map in asp.net nisar87 4 5,479 07-19-2011 06:43 AM
Last Post: nisar87
  Google Map in asp.net nisar87 7 6,018 07-16-2011 10:41 AM
Last Post: johnpaulmathew



User(s) browsing this thread: 1 Guest(s)