Difference between revisions of "LRM XML Support"

From Lingoport Wiki
Jump to: navigation, search
(AndroidParser.xml structure)
(Formatting xml files)
Line 2: Line 2:
 
LRM uses the ''xmlParser.xml'' file to parse any extensions that have a ''xml'' parser type. This file is located in the ../L10nStreamlining/<group>/projects/<project>/config folder.
 
LRM uses the ''xmlParser.xml'' file to parse any extensions that have a ''xml'' parser type. This file is located in the ../L10nStreamlining/<group>/projects/<project>/config folder.
   
The xmlParser.xml directs LRM on the location of the keys and values within the xml files as well as whether the key/value is translatable.
+
The xmlParser.xml directs LRM on the location of the keys and values within the xml files as well as whether the key/value is translatable. The directions are defined by x tokens:
  +
<ul>
  +
<li><b>TOKEN_KEY</b></li>
  +
<li><b>TOKEN_TRANSLATABLE</b></li>
  +
<li><b>TOKEN_VALUE</b></li>
  +
</ul>
   
 
There are 3 out-of-the-box parser definitions for XML files.
 
There are 3 out-of-the-box parser definitions for XML files.

Revision as of 17:18, 1 September 2017

Formatting xml files

LRM uses the xmlParser.xml file to parse any extensions that have a xml parser type. This file is located in the ../L10nStreamlining/<group>/projects/<project>/config folder.

The xmlParser.xml directs LRM on the location of the keys and values within the xml files as well as whether the key/value is translatable. The directions are defined by x tokens:

  • TOKEN_KEY
  • TOKEN_TRANSLATABLE
  • TOKEN_VALUE

There are 3 out-of-the-box parser definitions for XML files.

AndroidParser.xml structure

The AndroidParser.xml file defines the structure of Android files.

A typical Android file has the following structure:

<resources>
  <string name=""hello_world"" translatable=""true"">Hello World</string>
  <string name=""goodbye"" translatable=""true"">Good Bye</string>
</resources>

ResxParser.xml structure

RxmlParser.xml structure