InDesign IDML: Ways to include / exclude text to / from translation ?

I'm investigating different ways to include / exclude text in an IDML file. What I found is:

  • apply a "condition" to several portions of text; this text can be excluded,  i.e. it's not shown. However, text with this condition has to be hidden so that the necessary context is missing which is weird. Moreover, text with a wavy line underneath confuses people because they think of spell check markers.

  • hide layers with text that shall not be translated. This also can hide necessary context. Moreover, creating InDesign files with many layers is not contemporary any more; today, you try to keep your InDesign files as small and stable as possible - one file, one language - especially if you create/initially fill your InDesign files automatically.

What I couldn't find is:

  • apply a condition to several portions of text in order to explicitely have them translated. This would be much more convenient if only a small fraction of the existing text has to be translated [because the other text comes from databases and is already translated].

  • exclude or include some portions of text based on their applied paragraph or character style. This would make most sense and would be the easiest and most robust way to tell the translators what to do.

What do you think?

Have I overseen any mechanism to include or exclude text in InDesign IDML files?

Any comment and any help is greatly appreciated. Thanks a lot in advance!

Rudi

  • Would it be a help to define it on a Story basis? (Translate this story, but not that?)

    Daniel

  • That's a really good point. In some scenarios - like the one I'm doing my investigations at the moment - it would in fact be sufficient.

    In InDesign, I could tag a story with a story label - OK, not in the UI, but only by scripting - which could even turn out to be an advantage. Trados would then need to be able to assess this story label and so make the distinction.

    Thanks!

    Rudi

  • Or you could simply use the ICML file type, export selected stories to ICML, then only translate those. You can even have an almost-live-preview if you relink the ICML files with the icml files in the Studio target language folder. I work a lot with ICMLs for translation, especially in documents where only some parts need translating (e.g. catalogue pages with only some text fields updated). I find it very smooth and powerful. Officially, Studio supports ICMLs from CC2018, which feels ancient by now, but in practice I have not come across any incompatibilities recently.

    I like the idea of story labels. How would you do that in InDesign? If you upload a text file, I can try to make it work on the Studio side of things.

    Daniel

  • If the cursor is blinking within a story, you could use a script like:

    app.selection[0].parentStory.label = "myLabel";

    In the IDML, the story would then be flagged as shown in the screenshot.
    XML code snippet from Trados Studio with a red box highlighting the 'Properties' section where a 'Label' with 'Key' set to 'Label' and 'Value' set to 'myLabel' is defined.

    To assign the internal (unique) story id to each story of the currently active document, you could use:

    var doc = app.activeDocument;
    for (i = 0; i < doc.stories.length; i++)
    {
       doc.stories.item(i).label = doc.stories.item(i).id;
    }
    Rudi
    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 2:16 AM (GMT 0) on 29 Feb 2024]
  • One addendum. From the administrator's point of view, a story label is much more robust than conditional text. First, users can't see change story labels in the UI and change/remove them inadvertently. Second, users (people using InDesign) are not confused by any kind of text flagging like a line or wave underneath. Third, conditional text needs to be hidden prior to sending the IDML to SDL. Fourth, I can apply story labels by scripting at any time in the publishing process or even already in the InDesign templates.

    Hence, for all projects where we can translate on a story basis, this would be extremely helpful.

  • Thanks a lot. I tried to use the label for filtering, or at least to extract it as DSI (you could then lock segments based on that) - but I failed. I am not sure whether Trados Studio can do this out of the box. That would have been interesting for us, too...

    I am currently working on a similar problem - I'll post my solution here if I get anywhere with it.

    Daniel

  • Okay, the IDML and the ICML file types simply don't allow for this kind of filtering. The most you can achieve is to assign a paragraph style to a DSI and then filter using the Advanced Display Filter. You can't filter by character style, although using the App CleanupTask you can lock content enclosed by definable tags - unless they are outside a segment. So all this is not really what you seem to be looking for.

    You can either export to ICML or somehow extract the contents of the Stories folder in the IDML - then you have proper XML files. You now have to create a custom file type based on XML2 (the only one SDL/RWS wants to continue developing). Since you are obviously computer-literate, it is very simple to extract only the text you defined as translatable using Xpath. The question is how you display the context to the translator.

    You don't want to have a mix of languages in the TM, so you don't want any target language text in the source field of the editor, locked or not.

    I guess the solution is the XML preview. You have to write a bit of XSLT here. I am not speaking of formatting text to resemble the text-in-layout as in InDesign, just a concatenation of the content of the Content elements in the ICML.

    This will suffice for my usecase. Maybe it's at least a step in the right direction for you.

    (I looked at other CAT tools, and I did not find any that offer the kind of filtering you are looking for, so I guess there is not that much demand. But if you want to write an idea in the ideas section of the forum (https://community.sdl.com/ideas/translation-productivity-ideas/) You can be sure of my vote.)

    Daniel

    EDIT: I just found that my XSLT file causes an error when using XML2, but works fine in every other application including Studio using the Legacy XML file type. Maybe a bug in the XML2 file type?

  • Hi 

    I wanted to conclude this thread with my "solution" and some thoughts.

    1) Without developing a custom file type (which is always an option if you have the funding or skills) is possible to create a file type using out of the box Trados Studio functionality which will extract only specific paragraph or character styles for translation, while displaying the entire text of the InDesign Story to the translatror for context:

    Trados Studio interface showing the option to create a file type that extracts specific paragraph or character styles for translation.

    Another option for context is to "display all content" instead of "display all segments":

    Trados Studio setting displaying the 'display all content' option instead of 'display all segments' for providing context to the translator.

    I am still tinkering around, so the files I attach are not "ready to use", they are "alpha versions", but I think they give a good idea of which way I went:

    icml selective file type experimental.zip & icml_preview.zip

    We are going to use this for lengthy documents where only a few paragraphs or sentences change and it does not seem worth re-layouting the whole target document.

    The icml and idml file types are much more user-friendly, and I don't think you can achieve this with an out-of-the-box customized XML file type.

    Have a good weekend!

    Daniel

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 2:17 AM (GMT 0) on 29 Feb 2024]