I'm building an application with multilanguage support in TMX. I've found some editors for windows, but since I'm developing on a remote server, I'm looking for a command line tool for linux to translate strings and write them to a TMX file. Does anyone know of such tools ?
3 Answers
TMX, (Translation Memory eXchange) format is a simple XML file. You can find the exact specifications here: http://www.lisa.org/Translation-Memory-e.34.0.html#c33.
You will also find validation tools there.
As you will note, there are several versions of the TMX format. Assuming that you do not care about the formating information, the oldest format is the most widely supported.
Here is an example of TMX code:
<body>
<tu creationdate="20080317T093024Z" creationid="user_name">
<tuv xml:lang="EN-US">
<seg>English text</seg>
</tuv>
<tuv xml:lang="FR-FR">
<seg>French text</seg>
</tuv>
...
</tu>
</body>
There are several open source projects with TMX support, like OmegaT (Java) and the Okapi Framework (Java & .NET), but frankly, it will probably be easier for you to output TMX directly.
I mean, no matter the tool, you will have to specify the source and target language codes (WARNING: This is the single biggest source of compatibility issues between TMX tools. Be generous in what you accept...), and you also have to output the language strings and specify what language they are in.
So just wrap your strings with the XML tags, slap a time stamp and you are done.

- 8,898
- 5
- 37
- 54
-
By the way, wasn't that a bounty question? – Sylverdrag May 25 '09 at 14:04
-
It is, the bounty should be over by now. The checkmark for accepting answers doesn't appear, but yours should be accepted as it has the highest rating. – I.devries May 25 '09 at 19:58
I found po2tmx on the wikipedia page for TMX
Edited to add an example .po file
Format of a .po file:
msgid "This is my first string"
msgstr "This is my first string"
msgid "This is my second string"
msgstr "This is my second string"

- 1,535
- 17
- 20
-
I don't have PO files, I just want to input a string with its translations and make it write to a TMX file. – I.devries May 17 '09 at 12:56
bitext2tmx, maybe? It's written in java, and runs well on linux. It merges data from two plain text files. I haven't tried it, but it looks like it has ok editing facilities.

- 5,538
- 2
- 20
- 15