views:

284

answers:

3

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 ?

A: 

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"
codeDr
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
A: 

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.

Pianosaurus
+1  A: 

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.

Sylverdrag
The checkmark to accept your answer disappeared from my screen, so I upvoted it instead.
I.devries
Thanks. Glad to be of help
Sylverdrag
By the way, wasn't that a bounty question?
Sylverdrag
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