How to translate natural languages in C#

Using the WhatsMate Translation REST API



This article shows you how to translate text in Microsoft’s .net language: C#.

To translate textual natural languages (e.g. from English to Tamil) in C#, do this:

  1. Copy the following source code to the main class in your Console Application in Visual Studio.
  2. Specify your translation requirements on lines 19 through 22.
  3. Add the reference “System.Web.Extensions” by doing this:
    1. Right-click on your project node in the Solution Explorer panel.
    2. Choose “Add” -> “Reference…”
    3. Choose “Framework” on the left pane.
    4. Look for “System.Web.Extensions” in the middle pane. Check the checkbox in front of it.
    5. Click OK.
  4. 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.