GetLanguages Method
[This is preliminary documentation and is subject to change.]
Syntax
Example
Obtain a list of language codes representing languages that are supported by the Translation Service.
Syntax
JavaScript
string[] Microsoft.Translator.getLanguages();
Example
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>