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 ?
views:
284answers:
3I 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"
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.
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.