Sub TranslateAndPaste()
Dim text_str As String, src_lang As String, trgt_lang As String
Dim s1 As Long, s2 As Long
Dim url_str As String, rsp As String
Const rslt_div As String = "<div class=""result-container"">"
Const url_temp_src As String = "https://translate.google.com/m?hl=[from]&sl=[from]&tl=[to]&ie=UTF-8&prev=_m&q="
src_lang = "en"
trgt_lang = "hi"
text_str = ThisWorkbook.Sheets("Sheet1").Range("A2").Value
url_str = url_temp_src & WorksheetFunction.EncodeURL(text_str)
url_str = Replace(url_str, "[to]", trgt_lang)
url_str = Replace(url_str, "[from]", src_lang)
rsp = WorksheetFunction.WebService(url_str)
s1 = InStr(rsp, rslt_div)
If s1 Then
s1 = s1 + Len(rslt_div)
s2 = InStr(s1, rsp, "</div>")
If s2 > s1 Then
ActiveCell.Value = Mid$(rsp, s1, s2 - s1)
End If
End If
End Sub