Start a new topic

Viewing TMX files in your browser

Here's a nice tip from Joakim Braun at Proz.com:


Add a CSS style sheet to the TMX memory Apr 20, 2012


Since TMX is an XML file, you can associate a CSS style sheet to it.
The style sheet can be set up to display your TMX data as a HTML table.

Like this:
1. Rename the TMX file with an .xml extension.
2. Open the TMX/XML file in a plaintext editor.
3. Beneath the first line (which should read "<?xml version="1.0" encoding="UTF-8"?>"), add this line:
<?xml-stylesheet type="text/css" href="test.css"?>

4. Create a plaintext file in the same directory as the TMX/XML file. Name it "test.css". Enter this text:

note{display:none}
prop{display:none}
body{display:table}
tu{display:table-row}
tuv{display:table-cell}

5. Open the TMX/XML file in a Web browser. The text of the translation units should be displayed in a simple tabular format. This text can be copied as plaintext.

css
(104 Bytes)

Nice idea, especially for on a Mac, but on Windows I think I'd prefer to just open it in one of the various TMX editors/viewers.

Sure. TMX editor. There's a nice one in CafeTran too.


However, it would be interesting to further investigate how this technique can be used to index TMX files and make them searchable, e.g. with Houdaspot, Spotlight, etc. To query them via the Desktop Search Tool interface in CafeTran etc.

Login to post a comment