XML Engine

About the XML-Translation Engine

The XML-Translation Engine is a separate (add-on) module based on Visual Localize. This XML-Engine allows a quick and easy translation of every XML file in the familiar environment of Visual Localize. A XML Import Definition file (*.xid) protects the XML structure from being altered and avoids accidentally produced errors during the translation process.

In order to use the XML-Engine you need a „Visual Localize (Premium) Edition” license

Step 1: Creation of an XML Import Definition file (*.xid)

Before generating a new localization project (*.prj) it is necessary to create an XML Import Definition file (*.xid). This XML Import Definition file will be associated with your XML file for translation.
Your XML Import Definition file determines which XML nodes or attributes have to be translated later on.
All other XML nodes or attributes which were not approved for translation or do not pass the optional XML filter can not be altered or translated by the translator.
Start Visual Localize. The main frame will be displayed.
Select the menu item “New XML Import Definition File…” :

Creation of new XID file
Creation of new XID file

The dialog ”XML Files” to select a XML file for translation will be displayed:

XID file selection
XID file selection

Please select the XML file which needs to be translated. Press the button “Open” to confirm your selection. Your selected XML file will be opened to create an appropriate XML Import Definition file (*.xid):

XID configuration
XID configuration

The left upper window shows the structure of your selected XML file. The characteristics of each different XML node in the same hierarchical level will be displayed only once. (To simplify matters, recurring nodes with the same structure will not be displayed.).

Definition of the ID
For the configuration of your XML file, please click on the root node (here: books) in the window with the XML structure:

Structure of a XML file
Structure of a XML file

In the configuration window on the right side, the settings for the selected node with all its attributes will be displayed.
(If one of the checkboxes is activated, the name of the appropriate XML node will be displayed with font style bold in the structure window.):

ID configuration
ID configuration

For the translation and a proper version handling of your XML file it is absolutely necessary to define a unique identifier (ID) for the complete XML structure.
In the column ”Is used” you can configure how the ID for your XML file will be defined. For the definition of your ID you can differentiate between two possibilities:

1. The ID of a XML node will be defined by his position within the complete XML structure.
Example:

<books>
   <book>titel1</book>
   <book>titel2</book>
   <book>titel3</book>
</books>

If this method is your preferred kind to build the ID, please check on the check box which is located in the column “Is used for ID” in the row “Position”.

2. The ID of a XML node will be defined by the unique value of one or more of its attributes.
Example:

<books>
   <book no=“1“>titel1</book>
   <book no=“2“>titel2</book>
   <book no=“3“>titel3</book>
</books>

If this method is your preferred kind to build the ID, please check on the check box which is located in the column “Is used for ID” in the row Attibute ”xxx”. (For example: Attribute ”no”)
Please repeat this ID definition procedure for each XML node which shall be translated. 
TIP:
For the creation of a new XML file, we recommend to always use a unique identifier (ID). (E.g. the attribute “id=n“ in which “n“ is a unique number). This ID facilitates the localization of a single node within the complete XML structure and simplifies the version handling.
Note: For a correct version handling in Visual Localize it is absolutely necessary that the ID of each XML node is unique! If the ID is not unique, Visual Localize will automatically notice you when your XML Import Definition file (*.xid) will be saved. In this case you should change the definition of your ID in order to prevent possible errors.

Note: In order to define a unique ID it can be necessary to use the value of several attributes to generate a combined key. Please mark all check boxes from the attributes, in the column "Is used for ID", which are essential to define a combined key (ID).

Note: In case of using one or more attributes, which do not exist in every XML node with the same hierarchical level, Visual Localize will display these attributes with a check mark in the column Optional. In the column "Default value" you can define a standard (default) value for these attributes.

Configuration of the phrases for translation

Mark each check box in the column "Must be translated" which contains a XML tag (Value of “<tag>”) or / and an attribute (Attribute “name”) for translation.
Note: It is not possible to translate a XML tag or an attribute which is used to define the ID for your XML file.

Optional filter for XML nodes
For the translation of special XML tags and / or attributes an optional filter functionality can be used. This filter uses the attributes in your XML file to differentiate between your differnet XML nodes. For example you can use an attribute (like translatable=”yes“), to define which special XML node shall be translated or not.
Please click on the “[ ] Filter” tab in your configuration window to configure a new filter rule:

XML filter tab
XML filter tab

(If a filter rule was configured for a certain XML node, a red check mark (see above) is displayed on its filter tab.)
The following window to configure a filter rule will be displayed:

XML filter configuration
XML filter configuration

Please click on the buttons “Insert before” or “Insert after” to add a new rule to your filter depending on the desired position.
If using more rules, each rule will have to be connected with another rule by using a Connector (AND / OR).
In the column “Attribute” you can chose an attribute of your XML note which shall be filtered.
Please select the desired filter operation (e.g. „=(String)“ for the search of a special string) in column Operator.

Note: If you want to search for a number in an attribute, it is necessary to us a numeric operator (e.g. „> (numeric)“).
If you want to search for a text phrase in an attribute, it is necessary to use a string operator (e.g. „= (String)“).

In the column “Value” please insert your number or test phrase which shall be searched for.
Depending on your defined rules, your XML file will be filtered in the preview window in real time:

XML preview during translation
XML preview during translation

Via the two tab controls “Filtered” and “Unfiltered” on the bottom of the preview window you can switch between both XML views.
In the end you will have to save your complete settings in a new XML Import Definition file (*.xid) by clicking on the button “Save as…”.

Step 2: Creation of a new XML localization project

A new XML localization project is created just as the familiar Visual Localize project. Just follow the steps described below:

TIP: Before you start a new project, please create a directory for your XML files in order that your localized XML files will not get mixed with your source files.

Start Visual Localize. The main frame will be displayed.
Please open the menu “File” and select the menu item “New Project...”:

Start a new XML project
Start a new XML project
Creation of new project
Creation of new project

This dialog is just the same like the one to create a new Visual Localize project concerning the project name, language selection and import functions.
In the field “Project” you will have to give a name to your XML localization project and define its directory by clicking on the button  .
Then please select the source & target language for your XML files.
Note: The available source and target language depend on the language version of your operating system (Win 2000 / XP) and the installed language packs.
Click on the “XML” tab to insert the XML file(s) to be translated and its (their) corresponding XML Import Definition file(s) (*.xid).
The following dialog will be displayed:

Inserting XML files into the project
Inserting XML files into the project

In the field “XML Files” you can select the XML file(s) to be loaded into your project by clicking on the small button on the right side of the text box.
In the field “XID Files” you can select the corresponding XID file(s) to be loaded into your project by clicking on the small   button on the right side of the text box.
Note: Every XML Import Definition file (*.xid) can be used only with this XML file(s) which exactly have the XML structure, that existed during the configuration (creation) of the corresponding XML Import Definition file. If several of your XML files have exactly the same XML structure, you can reuse one XML Import Definition file (*.xid) for all of them. In case that the XML structure was altered (e.g. for an update) it is necessary to create a new corresponding XML Import Definition file (*.xid).

In the field “XSL Files” you can select the XSL (Extensible Stylesheet Language) file(s) to be loaded into your project by clicking on the   button on the right side of the text box. This XSL file will be used to generate the preview and it is optional to enter a file here.
Click on the “OK” button to create your new localization project or “Cancel” to leave this dialog without creating a project.

Translation of XML files

After creating a project it will be displayed in the Visual Localize main window:

Project tree view
Project tree view

In the tree window on the left side you can see the project name and the XML file (here: test_books.xml) to be translated. By clicking on the "plus" sign the XML file will be opened and the amount of text phrases for translation will be displayed. If you click on the XML icon in the project tree (see below), Visual Localize will also display the complete XML structure in the preview window at the bottom:

Translation view of XML project
Translation view of XML project

All phrases which were defined for translation (from the selected XML file) are displayed in the translation window:

Translation view
Translation view

The translation can be done as in Visual Localize base version:
The upper row in the translation window contains the source phrase (with its ID) .The line directly below must be overwritten with the translation.
In the preview window the XML file with its translation will be displayed in real time. All phrases which are allowed to be translated are displayed with font style bold. The current phrase for translation is marked with a blue background:

XML / XSL Preview

In the preview window there are two different views:
If an optional XSL file (Extensible Stylesheet Language) and its XML file is used for the creation of a new localization project, Visual Localize will create an HTML Output in the preview window. This HTML Output displays the layout for the finished website. All translations will be displayed directly after inserting them in the translation window.

HTML Output
HTML Output

If no optional XSL file (Extensible Stylesheet Language) is loaded into the new localization project, Visual Localize will display the source code of the XML file in the preview window. All translations will be displayed directly after inserting them in the translation window.
In order to keep track of all translations the current phrase will be marked with a blue background.

WYSIWYG Editor
WYSIWYG Editor

Note: You can not make changes in the preview window. It is only allowed to switch between the source and target preview by clicking on the two tab controls at the bottom of the window.


 

VISUAL LOCALIZE 8.2.0

20.09.2013

... is now available and can be downloaded

[more]

USB dongle for Visual Localize available

07.01.2013

Visual Localize is available either with software license key or with hardware protection via USB...

[more]
Alt-Text