# Computer Assisted Translation of LaTeX document

We use LaTeX as our primary documentation source. Aside from execellent looking PDF documents it also provides us with the ability to:

• share chapters between different versions of tools,
• auto generate sections, eg. configuration option documentation, and
• generate HTML versions

In general, the people writing the english documentation are comfortable with LaTeX, however, we've recently hit a problem with producing translations. Especially with using Computer Assisted Translation (CAT) systems.

The tools that our translators are familiar with don't include support for LaTeX. One of the few tools to explicitly mention LaTeX is OmegaT however, it appears to do so indirectly.

Is there a correct way to structure LaTeX documents so they can be easily translated with a CAT tool?

• interesting question. with the kind of structuring you describe, i suspect that using a common format that independently translates well into latex and html wouldn't be trivial. maybe suggest to the creators of the translation systems that they become familiar with latex? if you find a good solution, and get good experience with it, i'd like to invite you to write it up for tugboat. – barbara beeton Jun 8 '16 at 15:25
• can you not make a simple conversion to (say) html that preserves the structure (but not the formatting) for translation and then just convert back so \textit{hello} becomes something like <span data-tex=\"textit">hello</span> – David Carlisle Jun 8 '16 at 16:07
• I'm not aware of any CAT tools that handle LaTeX directly, but I would think David's suggestion is worth investigating. I have a colleague who is a professional translator and who is familiar with LaTeX, so I'll ask. – Peter Flynn Jun 8 '16 at 21:03
• Update: my translator colleague asked his CAT supplier and they asked me for sample documents, as they had never heard of LaTeX :-) I sent them a brief description and explanation for their tech staff, plus three example documents (the quickstart.tex from Formatting Information, an article I wrote for TUGboat, and the entire .tex source of Formatting Information). They have replied to say they're looking at it. – Peter Flynn Jun 15 '16 at 22:59
• @PeterFlynn -- any feedback here? – barbara beeton Apr 16 '17 at 2:50

EDIT

I have deleted my previous answer as spell checking and proofing was not much related to your question. I leave the link for anyone interested in spell-checking the latex with languageTool and OmegaT

http://wiki.languagetool.org/checking-la-tex-with-languagetool

================================================

Your question encouraged me to test how OmegaT can be used for translation with latex projects, below I put my findings:

1. First of all you need OmegaT, I used version 4.1.1beta. The software can be downloaded from the OmegaT project website as well as from sourceforge . On Windows, I suggest to install it in a dedicated folder, not in Program Files, as you will need to edit some files, e.g., in case you use machine translation like google or Bing

2. You do not need any plugins for latex. The current version support latex files.

3. Create a project in OmegaT. A project contains many different files and folders e.g. source (where your source files are placed, target (where the output is stored)

4. Add all latex files that contain text to be translated to the project. Note that in OmegaT you will be able only to edit the pure test, some math formulas maybe, but the majority of latex markup is not editable during the translation. Also note that the files are copied to the source folder in OmegaT project and I don't believe that these can be updated during the ongoing translation. you can add new files, but you cannot edit files that you started translating.

5. OmegaT splits the text onto segments and adds special Tags in the text, which allow later to put the text back into the original markup. Segments are sentences or paragraphs, or some other parts depending on the setup

6. You translate all segments

7. To produce the output, you run a Create Translated Document command (Ctrl-D). This can be repeated many times. It is needed to see the current result.

8. The target folder gets populated with the .tex files added to the project bit the text is replaced with the translation.

9. You copy the rest of important files from your original latex project to the target folders e.g. all figures, .eps files, graphics, etc

10. Compile the latex project with latex tools inside the target folder of OmegaT project. You should get the new translated version of your latex document

I suggest to search for OmegaT on YouTube - there are plenty of nice tutorials how to use OmegaT. Not with latex but there are no differences, I guess.

Last but not least, I mange to do all the above steps but failed to get the desired result. There is a bug (or I am doing something wrong). The main.tex file which is the main file in my latex project is corrupted - the CR/LF are replaced with LF or sometimes removed. I have created a ticket on OmegaT source forge site. I will update the post once it is solved.

• Thanks! This OmegaT is a awesome tool to translating latex. – user Aug 12 '17 at 1:13