1

I download the GoogleTranslateAPI.dll file and added the reference of it to my project. Now i took a textbox and wrote 'John' in it and took a label and want to be written 'John' in it but in 'French' language. So i wrote in the button_click event....

    private void button1_Click(object sender, EventArgs e)
    {
        string TT = Txt1.Text;

        Label1.Text=Google.API.Translate.Translator.Translate(TT, Google.API.Translate.Language.English,Google.API.Translate.Language.French);
    }

This gives an error saying "TRANSLATE FAILED"... Can anyone tell what i did wrong ?? This is a desktop application and will run off line.

Dev..

Dev
  • 260
  • 4
  • 18
  • 34

1 Answers1

1

Google Translate API v2 is the current version and is (since December 1, 2011) only available as a paid service...

Anyway to access the API the way you want to you need to register a key with Google and use that in your code. For some general information see http://code.google.com/intl/en-US/apis/language/translate/v2/getting_started.html

UPDATE - as per comments and after the OP update the question:

The Google API is only usable online - the DLL you downloaded is just a wrapper around the http-based server API.

IF you need to do this offline you will have to buy some commercial package with dictionaries for any language pairs you need and install that locally...

Yahia
  • 69,653
  • 9
  • 115
  • 144
  • I don't think that a guy from india the german site will help very much (if google starts to give out this site really translated some shiny day). ;-) – Oliver Feb 09 '12 at 08:23
  • @Oliver Thanks... changed that link to english (en-US). – Yahia Feb 09 '12 at 08:24
  • @Yahia Thanks, but my app will run offline. What to do here now ? – Dev Feb 09 '12 at 08:46
  • @Dev you are welcome :-) please upvote/mark as accepted answers that helped (see http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work)... this helps others when looking for such information too... – Yahia Feb 09 '12 at 09:03