By: Hans Hallebeek

Great tip and it works especially since my version of Excel does not support the TRANSLATE() function, but I made a minor modification to your great code:

Function translate_text$(text_str$, src_lang$, trgt_lang$)
Dim s1&, s2&, url_str$, rsp$, translatedtext$
Const rslt_div$ = “”
Const url_temp_src$ = “https://translate.google.com/m?hl=[from]&sl=[from]&tl=[to]&ie=UTF-8&prev=_m&q=”
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)
On Error GoTo no_GO
rsp = WorksheetFunction.WebService(url_str)
s1 = InStr(rsp, rslt_div)
If s1 Then
s1 = s1 + Len(rslt_div)
s2 = InStr(s1, rsp, “”)
translatedtext = Mid$(rsp, s1, s2 – s1)
GoSub correct_special_chars
translate_text = translatedtext ‘Mid$(rsp, s1, s2 – s1)
End If
no_GO:
Err.Clear
On Error GoTo 0
Exit Function
correct_special_chars:
‘* some apostrophe show up as '
If InStrRev(translatedtext, “'”) > 0 Then translatedtext = Replace(translatedtext, “'”, “‘”)

Return
End Function

This way the aposthophe like in French l’eau will not show up as l&;’eau