Terminology Matters Cube Logo
Quintilian Free Macros Download Purchase Contact Home
.ini File Preparation
The following Word macro isolates translatable content in .ini files. The non-translateable portion is marked as external tags with the tw4winExternal style. This requires that the TRADOS template is active.

Sub Prepare_INI()

Application.Run MacroName:="sAddTagStyles"
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = ActiveDocument.Styles("tw4winExternal")
With Selection.Find
.Text = "(^13*=)"
.Replacement.Text = "\1^p"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "(^13 )"
.Replacement.Text = "\1"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

Instructions
Launch MS Word and in the VB Editor, add the macro code above.
Now open the .ini file in Word and run the Prepare_INI macro, and save the resulting file as RTF.
The file can be processed using your CAT tool of choice. Once you have translated and cleaned the file, the INI structure can be recreated by executing the following Find & Replace:

Find What:  =^p
Replace With:  =

Now save your file as Plain Text with the extension .ini and the translation of the file is completed.