XML structure of localization files

After adding a project language on the Project Settings - Project Localization tab, a directory called Localization is created. In this directory, language subdirectories are created with an XML file for each specified language. This language-specific XML file is designed to contain translated strings for various objects defined in the project, such as captions or display names for fields.

The XML file enables you to create a complete translation for all objects defined in the project in a single step, whereas Project Builder only provides the possibility to create a per string (or object) translation.

Note Depending on the structure of the project, various objects can be available. The XML file contains only the objects (specified in tags) that are translatable for the project.

The naming schema of the tags used in the XML file reflect the object-names used in the project. That makes the XML easy to read and the values, you want translate, easy to find.

When editing the XML-file, you can translate either all object-values given for the project, or only a few selected ones and remove those that are not needed. Then, for the removed ones, the fall back mechanism is applied. The deletion of unneeded code snippets, enables simpler handling of the XML structure (when doing so, make sure that the XML text stays well-formed.)

The following image shows a code-snippet of a language-specific XML file, generated when added on the Project Settings - Project Localization Tab. This file contains nested value-tags that wrap the associated objects as strings. These strings are displayed in the selected project language as a basis for localization.
An image that shows an XML code snippet as an example how to localize fields.

Item 1 icon

The classes tag wraps up all classes defined in the project as child elements. In this example, there are more child elements nested in the classes-tag than are shown in the image. Therefore, no end-tag for classes is displayed.

Item 2 icon

The class tag wraps up all objects defined in this class as child elements. The attribute name specifies the class (in this example the Base class.) To save space, there is no end-tag for class displayed in this example.

Item 3 icon

The fields tag wraps up all kinds of fields defined in this specific class as child elements. In this example only one field is defined.

Item 4 icon

The field tag wraps up the data/value tags for the specific field as child and sub-child elements. The attribute name specifies the name of the field object that is localized.

Item 5 icon

The data tag wraps up the value tag for the specific field as a child element. The attribute name specifies the property that is localized.

Item 6 icon

The value tag wraps up the translatable string. The string is marked in red. A possible translation for the string is marked in green.)

Some objects have more than one data-tag. For example, if you want to translate strings of a database button for a Validation form, there are three data/value definitions you have to consider. A sample code-snippet is displayed in the following image:
An image that shows an XML code snippet as an example how to localize database button related items.

Item 1 icon

The validationbutton tag wraps up the data/value tags as child and sub-child elements. The attribute name specifies the name of the button object.

Item 2 icon

The data tag wraps up the value tag containing the localized string. The attribute name specifies the property that is localized. In this case it is the label text for the button.

Item 3 icon

The attribute name of this data tag specifies that the property that is localized is the caption for the database lookup window.

Item 4 icon

The attribute name of this data tag specifies that the property that is localized is the caption for the database lookup list.