Bing Translator problem: ArgumentOutOfRangeException: 'from' must be a valid language RRS feed

  • Pergunta

  • Hello,

    I am a beginner in Bing Translator developer. I’ve just signed up Windows Azure Marketplace and got the customer ID. I tried coding in VB2010 in all day but it’s failed. After I solved some problems until the last one which I had no idea to solve it. Expecting who is kindly helps me for this. The error is  ArgumentOutOfRangeException: 'from' must be a valid language

    Parameter name: from : ID=3817.V2_Soap.Translate.106AF0DA ( The detailed error is shown below.)

    I’d like to translate English language to Thai language. Please help me for this is appreciated. Thank you very much in advance.

    'Code Snippet
            Dim strTranslatedText As String = Nothing
                Dim client As New TranslatorService.LanguageServiceClient()
                client = New TranslatorService.LanguageServiceClient()
                strTranslatedText = client.Translate("my_client_ID", txtTranslateFrom.Text, txtTranslateFrom.Text, txtTranslatedText.Text, "en", "en")
                txtTranslatedText.Text = strTranslatedText
            Catch ex As Exception
            End Try
    'Code snippet In app.config
                <endpoint address="http://api.microsofttranslator.com/V2/soap.svc"
                    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_LanguageService2"
                    contract="TranslatorService.LanguageService" name="BasicHttpBinding_LanguageService1" />

    quinta-feira, 6 de dezembro de 2012 16:36

Todas as Respostas