Function TT(myText As String) As String
'-------------------------------------------
Const EDIT_TRANSLATIONS As Boolean = False
'-------------------------------------------
Dim sResult As String, EditResult As String
Dim Tr As Translator
TT = myText
Else
If sResult = myText Then
If Len(sResult) > 0 Then
If EDIT_TRANSLATIONS Then
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
TT = sResult
End If
End If
End Function
|