Android Question Rajeb api translator question

rezaghasmi

Member
api:
Sub MyText(value As String,fromLan As String,toLan As String)
    ProgressDialogShow("در حال ترجمه . . . ")
    SendParam.Download2("http://api.mymemory.translated.net/get",Array As String("q",value,"langpair",fromLan&"|"&toLan))
    Log("Send")
End Sub




Sub myt (value As String,fromLan As String,toLan As String)
    
    ProgressDialogShow("Translation files ......")
    SendParam2.Download2("http://api.mymemory.translated.net/get",Array As String("q",value,"langpair",fromLan&"|"&toLan))
End Sub

Sub JobDone(job As HttpJob)
    Log("jobdone")
    ProgressDialogHide
    If job.Success Then
        Log("success!")
        If job.JobName = "Translate" Then
            Log("Translate")
            Private parser As JSONParser
            parser.Initialize(job.GetString)
            Private TranslateText As Map
            TranslateText = parser.NextObject
            TranslateText = TranslateText.Get("responseData")
            Label7.Text = TranslateText.Get("translatedText")
        
        Else
            If job.JobName = "Translate1" Then
                Log("Translate1")
                Private parser As JSONParser
                parser.Initialize(job.GetString)
                Private TranslateText As Map
                TranslateText = parser.NextObject
                TranslateText = TranslateText.Get("responseData")
                Label6.Text = TranslateText.Get("translatedText")
        
        
        
    
            End If
        End If
    End If
End Sub
 
Upvote 0
Top