RC-WinTrans uses file converters to convert data from/to a certain file format (custom file format) to/from an XML format file (XLIFF). The XML file format is the internal processing format of RC-WinTrans.
The basic technical concept is that RC-WinTrans saves and processes data in the XLIFF file format. Converters are supplied to perform the task of converting a source file in format "X" and writing an XML file to be processed by RC-WinTrans. To create/write a translated target file, the appropriate file converter is used once again, this time to convert the XML format file back into the original file format.
The concept of using file converters realized as adaptable components makes it possible to translate various file formats without having to extend or change RC-WinTrans in order to support a new file format.
File converters are supplied to RC-WinTrans as VBA (Microsoft Visual Basic for Applications) macros. This means that RC-WinTrans calls VBA macros to read and to write a file to be translated. The VBA macros supply a predefined set of interface functions that are called by RC-WinTrans.
The VBA macros that make up a file converter can be regarded as a kind of interface for the file converter since RC-WinTrans will generally call VBA macros to read or write a file. However, the converter concept does not necessarily have to be realized (implemented, coded) with VBA. The point is to create such a file converter solution as a COM component to be used in the VBA macro that is called by RC-WinTrans.
Figure: File converters realized with different technologies can be used to convert a file format "X" to an XML (XLIFF) format file and vice versa, as shown in this diagram. In general, RC-WinTrans calls a VBA macro that may make use of various technologies and components.
For example, the file converter for Win32 binary files is made as a Win32 COM component coded in C++. The file converter for .NET assembly files is coded in C# as a .NET assembly DLL. For simple file formats such as Java properties files or Windows INI files, the corresponding file converters are coded purely in VBA.
RC-WinTrans has a ready-made file converter for XML files. Since XML files can have a variety of structures, the XML file converter needs to know which parts of a certain XML file are to be translated. This information is provided to the XML converter via XSL extended stylesheets. These stylesheets are called XML parsers. An XML parser points out the elements to be translated in an XML file.
See also: "XML Parser (XML File Converter)."
Samples for how to create your own file converter and how to create an XML parsers (XSL stylesheet) to translate an XML file as well as how to create a VBA macro file converter can be found in the RC-WinTrans Developer Help (Help file: "X8DeveloperHelp.chm").
A list of the file types already supported by RC-WinTrans appears in the "Supported File Types" Help topic.