RLM/LRM marks in XML

Hi, Community

I prepare the project with xml source files. one of the target languages is Arabic. I need to control right-to-left / left-to-rigt order for some parts of segment. But i cant insert RLM/LRM marks into target: not with hotkey (ctrl+alt+r/ctrl+alt+l(2011)/ctrl+alt+m(>2014)), not with click icon  RLM LRM on Ribbon. No that problem if the soorce file is docx/xlsx/html/itd and so on. 

I can only copy/past the marks from other file.

How can I insert the marks, not copy/past 

Parents
  • Hello   

    If you create new quick inserts for the XML filetype then you will be able to add them.  I believe this is because the use of unicode control characters for XML needs to be explicitly set as it's normally better to use markup... although I know this isn't always going to be possible.  So here I added two new Quick Inserts to my XML filetype by copy pasting the controls from a Word file... I could not find another way to do this:

    Trados Studio Project Settings showing QuickInsert options with 'Left to right marker' and 'Right to left marker' added.

    Now I can add these controls in my XML filetype in these ways. Using the new Quick Inserts I just added:

    Trados Studio toolbar highlighting the new QuickInsert for 'Left to right marker' with shortcut Ctrl+Shift+4.

    Or by using the built in controls that are now enabled for this filetype:

    Trados Studio formatting toolbar with an arrow pointing to the 'Insert left-to-right mark' button with shortcut Ctrl+Alt+Shift+M.

    So now I can do this (click the image to see it properly) using some example text I copied from  as I often struggle a little with knowing where to place these controls and I also google translated the Arabic so apologies for that too!:

    Trados Studio verification message indicating that the XML tags contain some comments and should remain in English.

    Hope that helps?

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 3:04 PM (GMT 0) on 28 Feb 2024]
Reply
  • Hello   

    If you create new quick inserts for the XML filetype then you will be able to add them.  I believe this is because the use of unicode control characters for XML needs to be explicitly set as it's normally better to use markup... although I know this isn't always going to be possible.  So here I added two new Quick Inserts to my XML filetype by copy pasting the controls from a Word file... I could not find another way to do this:

    Trados Studio Project Settings showing QuickInsert options with 'Left to right marker' and 'Right to left marker' added.

    Now I can add these controls in my XML filetype in these ways. Using the new Quick Inserts I just added:

    Trados Studio toolbar highlighting the new QuickInsert for 'Left to right marker' with shortcut Ctrl+Shift+4.

    Or by using the built in controls that are now enabled for this filetype:

    Trados Studio formatting toolbar with an arrow pointing to the 'Insert left-to-right mark' button with shortcut Ctrl+Alt+Shift+M.

    So now I can do this (click the image to see it properly) using some example text I copied from  as I often struggle a little with knowing where to place these controls and I also google translated the Arabic so apologies for that too!:

    Trados Studio verification message indicating that the XML tags contain some comments and should remain in English.

    Hope that helps?

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 3:04 PM (GMT 0) on 28 Feb 2024]
Children


  • Why would you do this though? For XML the author should provide this ability in the custom XML filetype as it may not be wanted at all. In this case it may be acceptable for inline controls but it isn't always. If the controls are made available through the filetype then it can be shared with the project and nobody needs to do anything. Changing the xml for the plugin like this would need to be done for each computer receiving the project.

    This workaround is possibly helpful if the need for the control was forgotten and it wasn't possible to prepare the project correctly, but it may be unhelpful, or even unwanted, if the ommission was deliberate. It's not always a good idea to find ways around the software unless you know why the restrictions are there in the first place.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Unknown said:
    The only thing I'm interested in is "Get things Done"

    The problem with such people is that they usually get the things done a completely wrong way (and possibly also break something else).
    The wrong way is usually not obvious immediately and shows itself only later.

    But discussing this with such people is usually pointless anyway as they are simply unable to realize the problem they are creating.

  • Unknown said:
    I believe this is because the use of unicode control characters for XML needs to be explicitly set as it's normally better to use markup... although I know this isn't always going to be possible.

    I don't quite understand what you mean here, Paul. The control characters are just characters as any other and as long as the actual XML encoding allows inserting such characters, there is no problem using them.
    In fact, using markup for inserting such characters is NOT wanted in XML as there is no pre-defined way to do it (and "inventing" any may break the XML as well).

  • Unknown said:
    I don't quite understand what you mean here, Paul. The control characters are just characters as any other and as long as the actual XML encoding allows inserting such characters, there is no problem using them.
    In fact, using markup for inserting such characters is NOT wanted in XML as there is no pre-defined way to do it (and "inventing" any may break the XML as well).

    I'm making some assumptions on why these controls are not available in XML to begin with.  I know there are no predefined ways to handle these controls in XML markup so I would expect two things to happen:

    1. Structural control is completed by the use of a stylesheet in the target application since these unicode markers won't cross the structure anyway and it would be considered bad practice to use them with every element 
    2. Inline control needs the control characters as it's "probably" not possible any other way, which I referred to

    That's all I meant, I was just guessing at why they are not available.  In general I think we are too prescriptive with our filetypes and don't allow the user enough control over what they do with the content... but on the flipside not all users have the right knowledge to make the right decisions and this probably influenced the way our filetypes are developed.  But again... I'm just guessing!

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Unknown said:
    I'm making some assumptions on why these controls are not available in XML to begin with.  I know there are no predefined ways to handle these controls in XML markup

    But there is no need for any "predefined way to handle these controls"...
    This has nothing to do with XML structure. It's just a character, nothing else.

    It's exactly the same thing as, for example, inserting a non-breaking space in text - you simply insert the NO-BREAK SPACE unicode character in the text as a normal character and that's it. You don't need any special markup at all (though you can use one of the pre-defined entities in HTML, for example... like   or   or   but you DON'T HAVE TO!).

    My wild guess is that the developers don't get this simple fact (that control characters only CAN be inserted into some markup formats using pre-defined entities, but DON'T HAVE TO) and limit the functionality based on their wrong idea that a markup must be used...
    But the exact explanation (not just guesses) would be expected from SDL side, of course.

  • Thanks, but it wasn't help. The packages come from client without any "Custom Quick insert symbols" but not as a source xml. So i can't to do my filter for xml. It is difficult to do on client side because his workflow use SDL TMS and external preparation services. And workflow is so intensive for any experiment. I am not alone vendor and Arabic is not alone language.

    "Built-in control" don't insert RLM/LRM symbols, as i wrote. The tool "Advanced - Insert Symbols" is stupid because don't show digital unicode for symbols and to find \u200f not real.

    What about conflict control symbol RLM/LRM to xml structure... but i can copy-past from Windows CharacterMap or from another file these symbols, to chek it (F8) wthout any error mesages , save and clean-up to target xml. Therefore it is not conflict from SDL point of view.  Altova XmlSpy or plugins for checking xml in Notepad++ show that xml with RLM in text are validate.

    No any xml dont processed by itsel, but is used in the some application, which know what to do with control symbols.

    why this problem arise? before file preparation was two stage xml->itd->sdlxliff. and wasnt any problem to insert RLM/LRM symbols in itd-filter-prepared files (name.itd.sdlxliff).

    and it is client requirement to set RLM/LRM marks

    i have created a little project for experiment (attached). i will so glad if you suggest any way to insert RLM/LRM not with copy/past. 

     

    !!! it seems that i can edit Quick insert in project from opened package. Moreover: when i have added Quick insert symbols for RLM/LRM, builtin control insertion and hot-keys (Ctrl+Alt+Shift+R) also began to work!!!! wonderfull xml structure control from SDL :)

    Any.zip