locked
google translator using API in vb.Net RRS feed

  • Question

  • Hi,

    Can anybody help me with VB.Net code to convert chinese charactors to english using google API's in the below mentioned link.

    The link has sample in C# code but i am looking for vb.Net code. To use it with SSIS package.

    http://code.google.com/p/google-api-for-dotnet/


    Thanks,
    Chaitanya
    Monday, December 21, 2009 10:25 AM

Answers

  • Hi Chaitanya!

    Just download the api and add reference to dll file after unpacking.(Project menu add reference, find the dll in zip file)

    Use following code to translate.

     Dim trans As New Google.API.Translate.TranslateClient("http://www.mydotnetblog.org")
     Dim InEnglish = trans.Translate("我喜欢跑步。", Google.API.Translate.Language.ChineseSimplified, Google.API.Translate.Language.English, Google.API.Translate.TranslateFormat.Text)




    Arjun Paudel
    Monday, December 21, 2009 2:02 PM

All replies

  • Hi Chaitanya!

    Just download the api and add reference to dll file after unpacking.(Project menu add reference, find the dll in zip file)

    Use following code to translate.

     Dim trans As New Google.API.Translate.TranslateClient("http://www.mydotnetblog.org")
     Dim InEnglish = trans.Translate("我喜欢跑步。", Google.API.Translate.Language.ChineseSimplified, Google.API.Translate.Language.English, Google.API.Translate.TranslateFormat.Text)




    Arjun Paudel
    Monday, December 21, 2009 2:02 PM
  • Hi Arjun,

    where to add the code? the form load... or on some button?

    i tried on button_click.. noting happens wen i press it.

    sorry am a newbie in .net

    thanks!!
    Friday, January 29, 2010 8:16 AM
  • Hi Arjun,

    where to add the code? the form load... or on some button?

    i tried on button_click.. noting happens wen i press it.

    sorry am a newbie in .net

    thanks!!

    if you add msgbox(inenglish) or textbox1.text = inenglish it will work
    inenglish is the string that contains the transelation
    Friday, February 26, 2010 5:41 PM