1 out of 1 rated this helpful - Rate this topic

GetLanguages Method

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

Obtain a list of language codes representing languages that are supported by the Translation Service.

JavaScript
    string[] Microsoft.Translator.getLanguages();
    

A string array containing the language codes supported by the Translator Services

JavaScript
<html>
   <head>
      <title>GetLanguages Demo</title>
      
      <script type="text/javascript" 
                 src="http://api.microsofttranslator.com/V1/Ajax.svc/Embed?appId=myAppId">
      </script>
      
      <script type="text/javascript">
      
      var currentLanguages;
      
      function GetLanguages()
      {
            currentLanguages = Microsoft.Translator.GetLanguages();
            for (var i = 0; i < currentLanguages.length; i++)
            {
                alert('Language code found: ' + currentLanguages[i]);
            }
      }
      
      window.onload = GetLanguages;
      
      </script>
   </head>
   <body>
   </body> 
</html>
                                
Did you find this helpful?
(1500 characters remaining)