How to translate control language using google api

I download the GoogleTranslateAPI.dll file and add a link to it in my project. Now I took the text box and wrote "John" in it, took the shortcut and wanted it to say "John" in it, but in "French". 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 that โ€œTRANSFER DENIEDโ€ ... Can anyone say what I did wrong? This is a desktop application and will be disabled.

Dev ..

+1
source share
1 answer

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

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

UPDATE - according to the comments and after updating the OP the question is:

The Google API is only available on the Internet โ€” the DLL you downloaded is just an http-based API wrapper.

If you need to do this offline, you will have to buy some commercial package with dictionaries for any pairs of languages โ€‹โ€‹that you need and install them locally ...

+1
source

Source: https://habr.com/ru/post/896441/


All Articles