COM - Component Object Model

 

RC-WinTrans’ flexibility is expanded even further by the RC-WinTrans component object model, the underlying structure of the program, and the access it provides to COM objects.  The object model makes it possible to access all of the translation data all the way down to the individual attributes. The object model also provides access to the GUI (graphical user interface) components of RC-WinTrans and to several "Tools" objects.

 

Related topics...

 

 

Figure 1:  The RC-WinTrans COM object model with "Application," "Projects," and "Data" objects.

 

 

Figure 2:  The "ProjectDocument" objects.

 

 

Figure 3:  The "Tools" objects.

 

 

Figure 4:  The "TRADOS" objects.

 

 

Figure 5:  The "Windows" objects.

 

 

RC-WinTrans can be completely controlled by other applications via OLE automation.  Thus RC-WinTrans can be fully integrated with detailed constructs such as a development environment or workflow management system.  Individual tasks that had to be performed manually in the past can now be automated and new functionalities can be realized.

 

All major RC-WinTrans application GUI components, projects, and translation data can be accessed by other applications and from the integrated VBA engine (VBA macros) via the RC-WinTrans object model.  The extensive object model makes RC-WinTrans a totally open system offering unlimited extendibility.

 

The component object model is composed of the OLE automation interfaces of RC-WinTrans and can be divided into the following main parts:

 

1.

Application with the GUI Components (Views)

The "Application" object is the primary interface of RC-WinTrans and the root object of the component object model.  Outside the application you also have access to all of the other objects in the model- workspace and project data, the GUI components, the "Tools" objects and the "User" object.

 

2.

Translation Project and File Management

A number of projects can be handled simultaneously whereby a project can contain an unlimited number of project files (files to be translated).  Furthermore, a project can have a number of languages (target languages) that the project files are translated into.

 

Note that a project and its project files are pure data objects (no views) that can be accessed without having to open a document (MDI window).  Opening a project document is time-consuming since one or more views showing the data usually have to be initialized. The RC-WinTrans objects provide access to files and data without having to open a document or view.

 

3.

Project Files and XLIFF Data Access

One of the most interesting aspects of data objects called up from a project file is that the objects reflect the underlying data format (XLIFF data files).  Basic knowledge of the XLIFF format renders the RC-WinTrans objects intuitively familiar because they represent the translation units, groups, and subfiles of an XLIFF file.  The data is accessible right down to each individual attribute where it is highlighted.  Thus a user can add his/her own data and attributes as it was explicitly intended by the XLIFF format- one of the many advantages of using XML.  All attributes defined in XLIFF are recognized by the RC-WinTrans component object model and available through enumeration objects.  User attributes ("x-" names) are also supported by the RC-WinTrans objects in the same way as was intended by XLIFF.

 

Binary data can be accessed as easily as text data through a translation unit object.  To work with binary data, the object model has a "Tools" object named "XMLTool" offering methods for further binary data processing.

 

In order to support totally free data access, the objects of "TransUnit" (XLIFF translation unit), "Group" (XLIFF group item), and "SubFile" (XLIFF file item) can provide a pure XML DOM node interface upon request.  The IXMLDOMNode interface is a standard interface of the Microsoft MSXML library that allows for navigation through the XML DOM tree and provides access to data even on low levels.

 

It literally is not possible to have more open access to data with a localization tool.  The openness is the result of the advantages of working with an XML format and of an object model that covers all the possibilities for accessing the XLIFF data.

 

4.

Project Document

(The data contained in) A translation project can be displyed by opening a project document (object: "ProjectDocument").  A project document is a MDI window in RC-WinTrans with several views of the data in different representations.  MDI windows also let you show and edit dialog and menu resources in WYSIWYG (What You See Is What You Get) views.

 

As mentioned above under number 2 ("Translation Project and File Management"), a project (the project data) is detached from a documen- it is not necessary for a project document to be open in order to access the data using the RC-WinTrans object model.

 

One of the views of a project document is the HTML view where prepared HTML pages can be displayed or where HTML pages can be created dynamically at run-time.

 

Note that the tool object "XMLTool" provides a method "Transform" that can be used to perform XSLT data transformations where the output of an HTML page can be shown in the HTML view of a project document.

 

5.

Tools

There are a number of tools objects available for executing VBA macros such as "DirectoryTool," "XMLTool," "WordAnalysis," and "VBATool."  The tools provide useful help functions for processing XML data, directory and INI file access, word counting, and more.

 

6.

Events

The "Application" object fires events that can be caught by event handlers.  An event handler can be a VBA macro, a script in an HTML page (hosting the RC-WinTrans ActiveX control), or an automation client that is connected to the event interface of RC-WinTrans.

 

Events are fired to inform about processes (started/running/finished) and about activities (e.g., item selection or the Find Translation command) in RC-WinTrans.  Events are usually caught in order to be informed of and to run one’s own (custom) activities.

 

7.

Dictionaries and Translation Memories

Dictionary objects are available to find, get, and save translation text.  The following standard file formats can be used as dictionaries: XLIFF, TMX, and TXT.  These are the file formats that are directly supported where other dictionaries or data sources such as online glossaries (Web glossaries) can be made available by using (creating/programming) a (custom) VBA macro.

 

Trados translation memories are supported directly as specialized dictionary objects.  A Trados dictionary object offers additional, specific methods offered by a Trados translation memory.  It is also possible to access the assigned Trados translation memory directly through a Trados dictionary object.

 

Related topics...

 

^ TOP ^