Not sure if it will work but you could try translation on the fly through google translate. I dont have arabic and it didnt work for me in arabic but you could try. Works in most of the other languages.
The language code for arabic is "ar"
Code:
Public Function GTranslate(strInput As String, strFromLang As String, strToLang As String) As String
Dim strURL As String, objHTTP As Object, objHTML As Object, objDivs As Object, objDiv As Variant
strURL = "https://translate.google.com/m?hl=" & strFromLang & _
"&sl=" & strFromLang & _
"&tl=" & strToLang & _
"&ie=UTF-8&prev=_m&q=" & strInput
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.Open "GET", strURL, False
objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
objHTTP.Send ""
Set objHTML = CreateObject("htmlfile")
With objHTML
.Open
.Write objHTTP.responseText
.Close
End With
Set objDivs = objHTML.getElementsByTagName("div")
For Each objDiv In objDivs
'If objDiv.className = "t0" Then 'it does not work, anymore
If objDiv.className = "result-container" Then 'adapted on December 28th
GTranslate = objDiv.innerText: Exit For
End If
Next objDiv
Set objHTML = Nothing: Set objHTTP = Nothing
End Function
Sub testTranslateG()
'MsgBox GTranslate("Este es un libro", "auto", "en")
Dim x As String
x = "the dog is barking"
MsgBox GTranslate(x, "en", "es")
End Sub
Code:
language codes
Amharic am
Arabic ar
Basque eu
Bengali bn
English (UK) en-GB
Portuguese (Brazil) pt-BR
Bulgarian bg
Catalan ca
Cherokee chr
Croatian hr
Czech cs
Danish da
Dutch nl
English (US) en
Estonian et
Filipino fil
Finnish fi
French fr
German de
Greek el
Gujarati gu
Hebrew iw
Hindi hi
Hungarian hu
Icelandic is
Indonesian id
Italian it
Japanese ja
Kannada kn
Korean ko
Latvian lv
Lithuanian lt
Malay ms
Malayalam ml
Marathi mr
Norwegian no
Polish pl
Portuguese (Portugal) pt-PT
Romanian ro
Russian ru
Serbian sr
Chinese (PRC) zh-CN
Slovak sk
Slovenian sl
Spanish es
Swahili sw
Swedish sv
Tamil ta
Telugu te
Thai th
Chinese (Taiwan) zh-TW
Turkish tr
Urdu ur
Ukrainian uk
Vietnamese vi
Welsh cy