locked
Translate label text using google api RRS feed

  • Question

  • hi,

    I am making an application in which user input the his name  and data in dgv and i want to add a button that translate whole form controls like 

    labels, dgv and toolstirp

    i have search allot but none of code work and iam making application in vb.net

    can some please upload the code for that and reference component (.dll) download link

    any sigle word would be helpful

    and one more thing that if i have publish the application  without checking the option for update- so how can i update the application in the PC like i have to first uninstall it and then re-install the new version or i install the new version without  uninstalling old version

    does any option can update the application!

    thanks allot!

    Wednesday, January 18, 2012 1:06 PM

Answers

All replies

  • If it's a website you are able to upload & download stuff using the normal DownloadFile method you can upload a text file with version information, download that, check it against the program's version on their pc(the one running) then replace the existing file with a new one downloaded using the downloadfile method...easy and simple

    you will want to upload version information after, even if right after uploading the program completely....that way people who open the program/check for updates will get the right version when updating...

    it's reccomended as well to keep old versions for a while & download them by a version name such as Program v15.exe Program v16.exe etc...that way people downloading(as an update) or for the first time won't get interrupted & wonder what's going on...after a few versions are on though others can be deleted safely with the assumption nobody should be downloading them.

    Wednesday, January 18, 2012 1:37 PM
  • hey its windows form application and please can any one help me with translation

    thanks

    Wednesday, January 18, 2012 1:50 PM
  • hi,

    I am making an application in which user input the his name  and data in dgv and i want to add a button that translate whole form controls like 

    labels, dgv and toolstirp

    i have search allot but none of code work and iam making application in vb.net

    can some please upload the code for that and reference component (.dll) download link

    any sigle word would be helpful

    • Merged by Reed KimbleMVP Wednesday, January 18, 2012 5:32 PM duplicate question
    Wednesday, January 18, 2012 2:19 PM
  • Hi,

    I am not very sure that Google has shutdown the translation API or not... but it still shows running downloadable link...

    Just download the api and add reference to dll file after unpacking.(Project menu add reference, find the dll in the link below :
    For more information visit : http://code.google.com/p/google-api-for-dotnet/ which features various APIs for developers in .NET
    If the download link does not work visit http://code.google.com/p/google-api-for-dotnet/ --> Downloads Section --> Download GoogleTranslateAPI_0.3.1.zip from it....
    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)
    

     


    Please mark as answer if the post helps you or unpropose as answer if it does not help you.

    Thanks

    Rehan Bharucha - The Tech Robot

    MCTS, MCITP, MCPD, MCT, MCC


    • Proposed as answer by REHAN BHARUCHA Wednesday, January 18, 2012 4:09 PM
    • Edited by REHAN BHARUCHA Wednesday, January 18, 2012 4:10 PM
    • Unproposed as answer by Reed KimbleMVP Wednesday, January 18, 2012 5:34 PM
    Wednesday, January 18, 2012 4:08 PM
  • Hi,

    I am not very sure that Google has shutdown the translation API or not... but it still shows running downloadable link...

    Just download the api and add reference to dll file after unpacking.(Project menu add reference, find the dll in the link below :
    For more information visit : http://code.google.com/p/google-api-for-dotnet/ which features various APIs for developers in .NET
    If the download link does not work visit http://code.google.com/p/google-api-for-dotnet/ --> Downloads Section --> Download GoogleTranslateAPI_0.3.1.zip from it....
    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)
    

     

     


    Please mark as answer if the post helps you or unpropose as answer if it does not help you.

     

    Thanks

    Rehan Bharucha - The Tech Robot

    MCTS, MCITP, MCPD, MCT, MCC


    hi i already tried that but it doesn't work

    can u please explain it more like if i want to translate label1.text

    thanks allot and one more thing for what this link is for i just want to translate label1 text not a site and their is no webrowser in my application("http://www.mydotnetblog.org")

     

    thanks allot

    Wednesday, January 18, 2012 4:18 PM
  • Hi chohan,

    Off topic: If you are American, please try to use proper grammar when writing. It would represent our countries' educational system at it's best when people choose to write smart. ;).

    On topic: I believe the Google API for Google Translate has been shut down due to abuse. You would have to "hack" it by using a web browser control to open translate and etc... To difficult if you ask me.

    Best option:

    • Use the Localization settings within Visual Studio to translate whole forms depending on what language the user selects or what language the OS is set to. (Forgive me as I cannot find the link for the documentation at the moment...)

    Best regards,

    - Jordan


    Jordan St. Godard | Microsoft® Community Contributor 2011

    Hey thanks and can you please tell me how to do that to trasnlate form with visual studio

    thanks allot

    and would you please tell me which grammar mistake i have done
    • Edited by chohan550 Wednesday, January 18, 2012 4:22 PM !
    Wednesday, January 18, 2012 4:21 PM
  • Hi,

    I tried it but its a paid service and the download link i provided is already deprecated as mentioned by someone earlier in the posts so they have introducted the version 2 compatible with JSON, REST services.

    Here is the link to version 2 which is a paid service use of translator recently converted to paid service from 1 Dec 2011.

    http://code.google.com/apis/language/translate/overview.html

    Visit Version 2 --> Libraries and Samples  --> Select .NET Samples in your right pane table -->  Select Translate API --> Visit Samples Translate.TranslateText --> Program.cs represents usage using CSharp only.

    Use online converters to convert code function one by one from CSharp to VB.NET but your code will not work as it is a paid service until you pay for the service.

     


    Please mark as answer or vote as helpful if it helps you or unpropose as answer if it does not help you.

    Thanks

    Rehan Bharucha - The Tech Robot

    MCTS, MCITP, MCPD, MCT, MCC

    • Edited by REHAN BHARUCHA Wednesday, January 18, 2012 5:18 PM
    • Proposed as answer by REHAN BHARUCHA Wednesday, January 18, 2012 5:18 PM
    • Unproposed as answer by Reed KimbleMVP Wednesday, January 18, 2012 5:34 PM
    • Proposed as answer by Reed KimbleMVP Wednesday, January 18, 2012 5:34 PM
    • Marked as answer by Youen Zen Thursday, February 2, 2012 5:14 AM
    Wednesday, January 18, 2012 5:17 PM
  • but it doesn't translate!

    and i want to translate the form while runing

    thanks allot

    Wednesday, January 18, 2012 5:30 PM
  • Please do not double post.  I will merge this thread with your older duplicate.
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"
    Wednesday, January 18, 2012 5:31 PM
  • Hi,

    Try using Localization and Globalization concepts in VB.NET to translate some objects on your form in the language of your choice. For examples visit these links :

    http://www.vb-helper.com/howto_net_localize_at_runtime.html

    http://www.dotnetcurry.com/ShowArticle.aspx?ID=174

    Understand what is globalization :

    http://www.careerride.com/VB-NET-how-to-implement-globalization-and-localization.aspx

    http://www.dotnetheaven.com/Uploadfile/brijrajsingh/glbal_102132006022647AM/glbal_1.aspx

    http://msdn.microsoft.com/en-us/goglobal/bb688096 (Samples)

    http://msdn.microsoft.com/en-us/library/y99d1cd3(v=vs.71).aspx (MSDN Resource)

     


    Please mark as answer if the post helps you or unpropose as answer if it does not help you.

    Thanks

    Rehan Bharucha - The Tech Robot

    MCTS, MCITP, MCPD, MCT, MCC

    • Edited by REHAN BHARUCHA Thursday, January 19, 2012 6:24 AM
    • Proposed as answer by REHAN BHARUCHA Thursday, January 19, 2012 6:24 AM
    • Marked as answer by Youen Zen Thursday, February 2, 2012 5:14 AM
    Thursday, January 19, 2012 6:23 AM