Function myTT(myText As String) As String '------------------------------------------- Const EDIT_TRANSLATIONS As Boolean = False '------------------------------------------- Dim sResult As String, EditResult As String Dim Tr As Translator If ForeignLanguage <> "UK_English" Then myTT = myText Else sResult = Trans(myText) If sResult = myText Then sResult = GetSetting("Tradium","MyTranslations", myText, "") If Len(sResult) > 0 Then If EDIT_TRANSLATIONS Then EditResult = InputBox(myText,"Check Translation", sResult) If Len(EditResult) > 0 Then SaveSetting "Tradium", "MyTranslations", myText, EditResult sResult = EditResult End If End If TT = sResult Else Set Tr = New Translator Tr.FromLanguage = "NL" Tr.ToLanguage = "EN" Tr.InputText = myText Tr.DoTranslate TT = Tr.OutputUnicode If Len(Tr.OutputUnicode) > 0 Then SaveSetting "Tradium", "MyTranslations", myText, Tr.OutputUnicode End If End If Else myTT = sResult End If End If End Function
|