GetLanguages Method

[This is preliminary documentation and is subject to change.]

Translates a string into a different language.

Dd576284.clear(en-us,MSDN.10).gif Syntax

URI

https://api.microsofttranslator.com/V1/Http.svc/GetLanguages

Dd576284.clear(en-us,MSDN.10).gif Parameters

Parameter Description

appId

A string representing the identifier of the calling application.

Dd576284.clear(en-us,MSDN.10).gif Return Value

A list of language codes that are supported by the Translation Service.

Dd576284.clear(en-us,MSDN.10).gif Example

C#

    string languageUri = "https://api.microsofttranslator.com/V1/Http.svc/GetLanguages?appId=myAppId";
    WebRequest req = System.Net.WebRequest.Create(languageUri);
    WebResponse resp = req.GetResponse();
    Stream strm = resp.GetResponseStream();
    StreamReader reader = new System.IO.StreamReader(strm);
                
    while (!reader.EndOfStream)
    {
        Console.WriteLine("Language Code found: " + reader.ReadLine());
    }