Machine translation from Wordfast

I linked my own macro based machine translation into my Wordfast Classic translation workflow. I know many translators frown upon machine translation, but I think it can be very useful. I also think we will see more and more machine translation in the future whether translators like it or not.

Over many years I have developed my own set of macro tools in Microsoft Word that help me improve the speed and quality of my translation work. I know machine translation in general is still very poor in quality, but my macros are quite good actually. So why do I think I can do better than the big players on the market? Because my macros are not trying to do everything for everyone: They are very specific to my language pairs and my client’s subject matter. And of course all translations are handled manually: I do not really trust the machine, I just allow it to help me.

Calling a machine translation macro from WordfastThere was a problem with merging my own solution with the CAT-tool Wordfast: Even though my macro was called I never saw its output when I opened a new translation unit. After struggling with this for a long time, I posted a call for help on the Wordfast support forum at I got some very helpful replies from John Fossey and Daniel Grau and I kept on researching the problem myself.

The solution I found works in two stages: I have wrapped the Wordfast macro that opens the next segment in a macro of my own and I use the macro call that is done by Wordfast just to set a flag to indicate to my wrapper macro it should do a translation on this segment.

So the way to use this is to call the wrapper macro every time you want to open a new segment instead of the standard macro WfNextSegment that Wordfast uses (linked to the key ALT+DOWN). You can link the wrapper macro to the same key, or to another key, for instance ALT+HOME.

This is the wrapper macro:

Sub MyNextSegment()
' MyNextSegment Macro
' Ask Wordfast to open the next translation unit
' After that do a translation if Wordfast has asked for one
    MyTrigger = False
    Application.Run MacroName:="WfNextSegment"
    If MyTrigger Then
      Call MyTranslate
    End If

End Sub

And this is the trigger macro:

Sub MySetTrigger()
' MySetTrigger Macro
' This is called every time Wordfast wants to call for MT
    MyTrigger = True

End Sub

Of course the boolean MyTrigger has to be declared as a global variable in the module:

Dim MyTrigger As Boolean

MyTranslate is the macro that does the actual translation work. I would like to leave that part as an exercise to the reader. 🙂


Comments are closed.