Overview. XML scanner options allow the user to specify how to localize XML files. Multilizer allows to localize both single-language and multilingual XML files.
The most important settings are the following:
This plug-in is available in Multilizer Enterprise and Multilizer Pro for Documents. To get an evaluation version for other Multilizer versions, contact sales(at)multilizer.com.
Output directory. Specifies the directory where the localized files will be created. This is the directory where Multilizer creates the localized output files and sub directories. You can control the name of the localized files and directories by setting Type and Coding.
Allows user to specify, whether to write localized files (one file per target language) or a multilingual file.
| Localized file(s) |
Create a separate file for each language in the project. For example if the original file is Sample.xml and the project contains German and French, Multilizer creates de\Sample.xml and fr\Sample.xml. These files equal to the original file except the selected tag contents have been translated. |
| Multilingual file |
Create a one multilingual XML containing all the languages in the project. The output directory is multilanguage. For example if the original file is Sample.xml, Multilizer creates multilanguage\Sample.xml that contains resources in each language of the project. The language of the tag is specified with xml:lang attribute. Note! in order to correctly create localized files, the source XML must have xml:lang attribute. |
Type. Specifies how and where MULTILIZER creates the localized file version(s). Possible options are:
| Subdirectory | Create localized file(s) in sub directories named by language and locale. |
| Bundle name | Append the language and locale information in the output file name. |
| File extension | Replace the original file extension with language and locale information. |
Coding. Selects file name initial coding style. Possible values are:
| ISO | ISO standard coding style. |
| .NET | Microsoft .Net coding style. |
| Windows | Windows coding style. |
Specifies the line feed (end-of-line character). It also affects what is written in the TAG content, if it's multi-line.
Native language. Specifies the native language that is used in the target . Set this to match the language in the original document. If the original document contains two or more languages mixed, set the language to most widely used.
Default language. Specifies the default language. It is the language that is used in the build process, if there is no translation given in the the build language. The translation search order is following: first the build languages, then the default language.
Native encoding. Specifies the native encoding that is used in the target with each character set.
Encoding list. Contains the encodings to be used in the localized files. To change the value right click the line and select a new value.
Here you specify the elements and attributes that contain localizable information. Simply check the elements that you want to localize.
This setting affects how Multilizer parses the XML.
Tags are used for the following purposes:
By default XML elements (nodes) with the same name are identified with a looping number. Thus, the context in Multilizer project consists of node names and index. This approach is useful in most situations. Problems arise however, if new nodes are inserted between old ones. In this case the context changes for all subsequent nodes, which might clear exsiting translations.
To customize the way that Multilizer forms the context, you can specify that attribute values are part of context. The additional information is declared as nodename - attributename pairs, like this:
row=id
row=id2
xml=mainid
The first value is the nodename and the second is the name of the attribute that is inside the node. In the context in Multilizer the context will contain the value of the specified attribute as seen in the examples below.
The user can specify multiple attribute names for the same node. In this case all attribute values are part of the context.
Using tags, the context becomes more static; the context doesn't change untile user changes an attribute value. This ensures that no translations are lost in localization.
To understand the importance of this feature, consider the following example:
XML file to localize:
Resulting Multilizer project:
| Default context | Context using attributes (as defined on Tags tab) | ||||||||||||||||||||||||
|
|
Next, XML a new tag is inserted in the XML file so that it becomes like this:
Resulting Multilizer project:
| Default context | Context using attributes (as defined on Tags tab) | ||||||||||||||||||||||||||||||
As seen, the contexts are the same, but native texts have changed for the context starting from the node that was changed. As translations keep their place according to context, they get displaced. |
As seen, the translations are on correct places. |
Reading of comments from attributes
Tags can be used for specifying that attribute values are read as row comments into Multilizer. For this purpose the following notation is used in tags:
!tagname=attributename
Example: With the following XML ...
... the user can specify the following tag for reading the comments:
!row=comment
Note! Use this feature carefully to avoid that Multilizer overwrites your existing row comments.
On the validation tab you can specify whether to validate the source (native) xml document or not.