1
我試圖 「測試」 一詞翻譯,
我的代碼:VB.net使用谷歌翻譯
Imports Google.API.Translate
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = "test"
Dim gtras As New TranslateClient("MY API KEY")
Label1.Text = gtras.Translate(TextBox1.Text, Language.English, Language.Hebrew, TranslateFormat.Text)
End Sub
End Class
的例外是:
Attempt by method 'Google_Translator.Form1.Button1_Click(System.Object, System.EventArgs)' to access method 'Google.API.Enumeration.op_Implicit(Google.API.Enumeration)' failed.
聽起來好像Google API的路徑設置不正確。老實說,這只是一個猜測(因此是一個評論,而不是一個建議的答案)。 – sacredfaith 2012-08-06 14:05:25
此外,請確保您的項目所針對的.Net版本與您正在使用的Google API的.Net版本相匹配。 – sacredfaith 2012-08-06 14:08:15
@sacredfaith爲什麼要改變.Net框架有所作爲? – 2012-08-07 04:13:51