Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] hebrew text

edited January 2013 in OpenSesame


when I try to display Hebrew text in sketchpad the letters are from left to right and not right to left
am I missing something?



  • edited January 2013

    Hi Dror,

    I would like to refer you to a previous post where Ezer asked the same question:

    In this thread Sebastiaan provided a piece of Python inline code which you could place in the Prepare phase tab of an inline_script item at the beginning of your experiment. The script makes sure that all text strings are reversed before being displayed, which should give the desired right-to-left result.

    Please let us know if you have any further questions!

    Best wishes,


  • edited 10:22PM

    is there a way that the inline script will only effect certain objects?
    i.e only couple of scetchpad or forms?

  • edited 10:22PM

    Hi Dror,

    Of course. By adding an additional if-statement (see line 6 in the script below) you can apply the remainder of the inline code only to certain items, in this case a sketchpad called "reversed":


    For the complete example experiment, see here. Simply download and 'save as' with the extension ".opensesame".

    Hope this helps!



  • edited 10:22PM

    that is exactly what I needed - problem solved

  • Hi everyone,

    I hope it's ok to comment on a solved discussion.

    I'm facing a similar problem Dror had with writing in Hebrew. I'm using form_text and ask participants to free write in Hebrew. Unfortunately, the text box starts from left to write (and not right to left) and when the participant writes more than one row the first row goes down (instead of starting a new one in the second row).
    I tried to use the solution Sebastiaan offered in the link Lotje referred here but an error: "cannot import name QString" popped up.

    Can anyone help me with this Issue?



  • I'm having the same problem, does anyone got a solution?

  • Hi guys,

    You'll want to take a look at this discussion:


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

  • Hi Sebastiaan,
    Thank you so much for your response.
    The left to right issue is not as important for me as the continuity of the rows problem.
    As S_H wrote, while writing a text in Hebrew, when the row is ended, the line moves down and the new line starts in the beginning of the text box. Are these two sides of the same coin?


  • Are these two sides of the same coin?


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

  • Ok :)
    I tried to implement the script you wrote in the discussion you referred to.
    However it didn't work for me, it seems like Hebrew font is not defined under that script as Hebrew characters are not shown at all when written. In addition, when writing in English, no new rows are created- it seems like there are no text box limits. Is it fixable? If yes, how can I combine this script with a form (either with form_base or inline script)?

Sign In or Register to comment.