This article shows you how to translate textual natural languages in Microsoft’s .net language: VB.
To translate text (e.g. from English to Japanese) in VB.NET, do this:
- Copy the following source code to the main module file in your Console Application in Visual Studio.
- Specify your translation requirements on lines 64 through 67.
- Add the reference “System.Web.Extensions” by doing this:
- Right-click on your project node in the Solution Explorer panel.
- Choose “Add” -> “Reference…”
- Choose “Framework” on the left pane.
- Look for “System.Web.Extensions” in the middle pane. Check the checkbox in front of it.
- Click OK.
- Build and run the application in Visual Studio.
Looking for your language code? See the complete listing.
The trial account only allows you to call the translation API up to 10 times for learning purpose. Subscribe to a Premium plan to use the translation API seriously.
Want to translate text in another programming language? Check out the Translation API page.