You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm trying to use the LibreTranslate API but without success. The return is always empty. I don't have a key because I use it occasionally and the API is free when you use it little.
What is the code missing to make it work?
Thank you for your reply
`
Try
Dim LibreTranslate = New LibreTranslate.Net.LibreTranslate
Dim SupportedLanguages As System.Collections.Generic.IEnumerable(Of SupportedLanguages) = Await LibreTranslate.GetSupportedLanguagesAsync()
'System.Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(SupportedLanguages, Newtonsoft.Json.Formatting.Indented))
Dim frenchText = "Hello World!"
Dim spanishText As String = Await LibreTranslate.TranslateAsync(New Translate() With {
.Source = LanguageCode.English,
.Target = LanguageCode.Spanish,
.Text = frenchText
})
Debug.Print(spanishText)
Catch ex As Exception
Debug.Print(ex.Message)
End Try
`
Try
Dim LibreTranslate = New LibreTranslate.Net.LibreTranslate
Dim SupportedLanguages As System.Collections.Generic.IEnumerable(Of SupportedLanguages) = Await LibreTranslate.GetSupportedLanguagesAsync()
'System.Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(SupportedLanguages, Newtonsoft.Json.Formatting.Indented))
Dim frenchText = "Hello World!"
Dim spanishText As String = Await LibreTranslate.TranslateAsync(New Translate() With {
.Source = LanguageCode.English,
.Target = LanguageCode.Spanish,
.Text = frenchText
})
Debug.Print(spanishText)
Catch ex As Exception
Debug.Print(ex.Message)
End Try
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying to use the LibreTranslate API but without success. The return is always empty. I don't have a key because I use it occasionally and the API is free when you use it little.
What is the code missing to make it work?
Thank you for your reply
`
Try
`
Try
The text was updated successfully, but these errors were encountered: