title: Windows Translator: "ArgumentOutOfRangeException: 'to' must be a valid language
body: <p>Im trying to use Bing Translator...</p>
  
  <p>Already Have a token (I think), but when try to get the translation, the same Error is always poping: </p>
  
  <pre><code>"ArgumentOutOfRangeException: 'to' must be a valid language\u000d\u000aParameter name: to : ID=5217.V2_Json.Translate.5FEAF805"
  </code></pre>
  
  <p>The next is the url that i am using, and I dont see where the error is...</p>
  
  <pre><code>https://api.microsofttranslator.com/V2/Ajax.svc/Translate?
  &amp;amp;appId=Bearer%20http%3a%2f%2fschemas.xmlsoap.org%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=TranslateHelper000&amp;amp;http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&amp;amp;Audience=http%3a%2f%2fapi.microsofttranslator.com&amp;amp;ExpiresOn=1439307776&amp;amp;Issuer=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&amp;amp;HMACSHA256=xGQ7LMehBDHJLY2Xq7jN8PXOhRCYqs%2boUb2V4Ic4XLI%3d
  &amp;amp;from=en
  &amp;amp;to=pt
  &amp;amp;text=Home
  &amp;amp;oncomplete=mycallback
  </code></pre>
  
  <p>(pt is defined as language in translator... it doesn't work either with to=en...</p>
  
  <p>My question are, if you could help me on this:
  1. Is that a normal Token?
  2. Is it is normal, what is wrong with code? (I dont have any more hair to take off...)</p>
  
  <p>This is the code I use to send the url (mycallback isn't being called either):</p>
  
  <pre><code>$.ajax({
          type: "POST",
          url: 'getTranslatorToken',
          contentType: "application/json; charset=utf-8",
          dataType: "json"
      }).done(function (token) {
  
  
          var languageFrom = "en";
          var languageTo = "pt";
          var textToTranslate = "Home";
  
          var strToken = token["access_token"];
          var s = document.createElement("script");
          //s.src = "http://api.microsofttranslator.com/V2/Ajax.svc/Translate?oncomplete=mycallback&amp;appId=Bearer " + token + "&amp;from=" + languageFrom + "&amp;to=" + languageTo + "&amp;text=" + $('#txtMsg').val();
           s.src = "https://api.microsofttranslator.com/V2/Ajax.svc/Translate?&amp;appId=Bearer " + strToken +
              "&amp;from=" + encodeURIComponent(languageFrom) +
              "&amp;to=" + encodeURIComponent(languageTo) +
              "&amp;text=" + encodeURIComponent(textToTranslate) +
              "&amp;oncomplete=mycallback";
  
  
          document.getElementsByTagName("head")[0].appendChild(s);
          console.log(s)
      }).fail(function (xhr, ajaxOptions, thrownError) {
          alert("Error:"+xhr.responseText);
          console.log(xhr.responseText);
          //$("#msg").text('Error');
      });
  </code></pre>
  
  <p>Thank</p>