If you open up a VB6 .frm file, you'll see at the top all the form controls, like this excerpt:
Begin VB.Frame frShipmentDetails
BackColor = &H00FFC0C0&
Caption = "Shipment Details by Part"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 2895
Left = 480
TabIndex = 28
Top = 6960
Width = 10935
Note that it's just a name/value pair. In VB6 you'll typically be looking for properties like Caption
and ToolTip
. A simple grep will get you a good list to start with. You could run the result through some automated technical translator if you want, or send it to a real technical translator (they're expensive though).
However, there are two very big caveats:
First, there's likely some code in the app like this:
If a = b Then
lblSomeLabel.Caption = "yes"
Else
lblSomeLabel.Caption = "no"
End If
... in which case, it's not static text anymore, it's dynamic.
What's worse is that you'll sometimes find this in some event handler:
If lblSomeLabel.Caption = "yes" Then
... do something ...
End If
Which means even if you fix the first lines where the set the Caption, you'll break the later line where you do the comparison. Trust me, this happens a lot in VB6 code.
I've done a translation of a VB6 app from English to Spanish before. Beware. It's much more work than you first think.
The right way to do it is to find all of these strings, put them in some kind of lookup table (with one column for each target language), and do the lookup every time.