Solution

It is possible to parse TMX files in Alchemy Catalyst, however one rule is necessary per language pair within the TMX. Because Catalyst projects are always bilingual.

Steps to Parse a TMX file in Alchemy Catalyst:.
 

  1. In Alchemy Catalyst, go to HOME > File Types & Parsing rules



    Then select XML based files > *.tmx file extension and click the "Add..." button.


     

  2. Enter a relevant rule name for the country codes you are building the ezParse rule for.
    For example below, the parser is for English to Spanish:


     

  3. Select the newly created rule and click the "Edit Methods..." button
     

  4. Point to your TMX file in the Template field and Click the preview button


     At this point, the Parsed XML field is empty because no element and attributes have been selected as Translatable.

  5. Double click the seg element in the "Highlight to display" column. This instructs Alchemy Catalyst that the seg element is localisable.
     

  6. Enter the following in the "Condition" column (double click to edit column cell):

    ../@xml:lang="en"

    This instructs Alchemy Catalyst to only take the string in the seg element under the condition that the parent element has the attribute "xml:lang" is equal to "en". Replace "en" with the source language code applicable, as found in your TMX file.

  7. Enter the following in the "Store Translation in" column:

    ../../tuv[@xml:lang="es"]/seg

    This means that Alchemy Catalyst will find and store the translation for the source string defined in the "Display on condition" column into the above xpath under the condition that the attribute "xml:lang" is equal to "es". Again, replace "es" with the applicable target language code from your TMX file.
     

  8. Click the preview button and verify the rules are suitable


     

  9. Click OK to save the parsing rule.
     

You can now insert your TMX file for the languages you have created parsing rules as above.

 

Notes

It is possible to parse TMX files in Alchemy Catalyst because the program uses xpath and treats TMX files as multilingual XMLs.

 

Sample files

List of sample files for the Solution outlined above:

sample.tmx  - Sample TMX file used above to build and test the parsing rule. It contains one string for translation, "Hello".

 

Products or Versions Affected

  • Alchemy CATALYST 11.0  and greater

Last updated with Catalyst 2019