Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Displaying bi-directional text starting with weak or neutral characters.
Forum Updated to NodeBB v4.3 + New Features

Displaying bi-directional text starting with weak or neutral characters.

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 576 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lemon_jelly
    wrote on last edited by
    #1

    I have a text string which starts with a bracket as in the example below:

    (x) hello world

    This displays correctly in left to right languages, but not in right to left languages. The same string translated into Arabic displays incorrectly as follows:

    (x) مرحبا العالم

    whereas I would expect it to display:

    مرحبا العالم (x)

    I've been trying to find a way by using horizontal alignment and/or layout mirroring as specified here http://qt-project.org/doc/qt-5.1/qtquick/qtquick-positioning-righttoleft.html to correctly display the string. I've also tried setting the layout direction at the application level but this doesn't work either.

    The only conclusion I can come to now is that special processing will be necessary on strings such as this to add the explicit right to left embedding marks (RLE).

    I've read somewhere that translators are expected to add such embedding levels but this isn't a robust solution considering some of our translated strings contain placeholders for text which is obviously unknown at translation time.

    Has anyone else come across this issue and if so, did you find a suitable solution?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved