Linux 上有命令行 TMX 编辑工具(多语言支持)吗?

发布于 2024-07-20 12:02:20 字数 131 浏览 11 评论 0原文

我正在 TMX 中构建一个支持多语言的应用程序。 我找到了一些适用于 Windows 的编辑器,但由于我是在远程服务器上进行开发,所以我正在寻找一个适用于 Linux 的命令行工具来翻译字符串并将其写入 TMX 文件。 有谁知道这样的工具吗?

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 ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

情归归情 2024-07-27 12:02:20

TMX(翻译记忆库交换)格式是一种简单的 XML 文件。 您可以在这里找到确切的规范:http://www .lisa.org/Translation-Memory-e.34.0.html#c33

您还可以在那里找到验证工具。

您将注意到,TMX 格式有多个版本。 假设您不关心格式信息,最旧的格式是最广泛支持的。

以下是 TMX 代码的示例:

<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>

有几个支持 TMX 的开源项目,例如 OmegaT (Java) 和 Okapi Framework (Java & .NET),但坦率地说,直接输出 TMX 可能会更容易。

我的意思是,无论使用哪种工具,您都必须指定源语言代码和目标语言代码(警告:这是 TMX 工具之间兼容性问题的最大来源。请慷慨地接受您所接受的内容...),并且您还必须输出语言字符串并指定它们所使用的语言。

因此,只需使用 XML 标签包装您的字符串,加上时间戳即可完成。

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.

空城缀染半城烟沙 2024-07-27 12:02:20

bitext2tmx,也许吧? 它是用java编写的,在linux上运行良好。 它合并来自两个纯文本文件的数据。 我还没有尝试过,但是看起来它有不错的编辑功能。

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.

最单纯的乌龟 2024-07-27 12:02:20

我在 TMX Edited 的维基百科页面上找到了 po2tmx

以添加示例 .po 文件< br>
.po 文件的格式:

msgid "This is my first string"
msgstr "This is my first string"

msgid "This is my second string"
msgstr "This is my second string"

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"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文