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

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

Children
  • 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.