GetLanguageNames Method

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

Obtains a list of languages available for translation, with the language names are localized into a desired language.

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

URI

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

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

Parameter Description

appId

A string representing the identifier of the calling application.

locale

A string representing the language code to localize the language names.

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

A string array containing languages names supported by the Translator Service, localized into the requested language.

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

C#

    string languageUri = "https://api.microsofttranslator.com/V1/Http.svc/GetLanguageNames?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 found: " + reader.ReadLine()); 
    }