Right to left language support

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Right to left language support

יהודה-2
Most of you probably speaks Latin language,  so you wont understand the problem.
when I try to write Hebrew in my statictext the last punctuation marks get mixed up.
does someone have a solution 
for this?

this is the code :

text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)

thanks!

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|

Re: Right to left language support

Kevin Grover-2


On Thu, Sep 4, 2008 at 7:25 AM, יהודה <[hidden email]> wrote:
Most of you probably speaks Latin language,  so you wont understand the problem.
when I try to write Hebrew in my statictext the last punctuation marks get mixed up.
does someone have a solution 
for this?

this is the code :

text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)

thanks!

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


For future reference:
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html

Python version?
wxPython version?
OS (and version)?
What Locale do you have set?
A snippet of code that reproduces the problem? (You probably want to convert your text to \x or \u strings and not use UTF8 (or other high bit Python source) --- even though it's legal you have have problems transmitting it via email and people being able to reconstruct it).  You'd probably need a picture of the problem and a description of what is wrong.

- Kevin


_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|

Re: Right to left language support

Robin Dunn
In reply to this post by יהודה-2
  יהודה wrote:
> Most of you probably speaks Latin language,  so you wont understand the
> problem.
> when I try to write Hebrew in my statictext the last punctuation marks
> get mixed up.
> does someone have a solution  for this?
>
> this is the code :
>
> text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)

I've never used it myself so I'm not sure exactly how well it works, but
  wx does have support for RTL layouts.  You should just need to call
SetLayoutDirection on the window, (probably the parent window is enough)
and if you do any custom drawing there is a SetLayoutDirection method
for wx.DC as well.



--
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|

Re: Right to left language support

יהודה-2
thanks i will google it

On Fri, Sep 5, 2008 at 8:06 PM, Robin Dunn <[hidden email]> wrote:
 יהודה wrote:
Most of you probably speaks Latin language,  so you wont understand the problem.
when I try to write Hebrew in my statictext the last punctuation marks get mixed up.
does someone have a solution  for this?

this is the code :

text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)

I've never used it myself so I'm not sure exactly how well it works, but  wx does have support for RTL layouts.  You should just need to call SetLayoutDirection on the window, (probably the parent window is enough) and if you do any custom drawing there is a SetLayoutDirection method for wx.DC as well.



--
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!


_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users



--
http://kaze.co.il
יש קצה חוט לרעיון שלך

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|

Re: Right to left language support

יהודה-2
In reply to this post by Robin Dunn
it worked!

i hoop this could help someone in the future

text1=wx.StaticText(panel3, -1, hebrewString  ", style=wx.RIGHT)
text1.SetLayoutDirection(2)

thank you!

On Fri, Sep 5, 2008 at 8:06 PM, Robin Dunn <[hidden email]> wrote:
 יהודה wrote:
Most of you probably speaks Latin language,  so you wont understand the problem.
when I try to write Hebrew in my statictext the last punctuation marks get mixed up.
does someone have a solution  for this?

this is the code :

text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)

I've never used it myself so I'm not sure exactly how well it works, but  wx does have support for RTL layouts.  You should just need to call SetLayoutDirection on the window, (probably the parent window is enough) and if you do any custom drawing there is a SetLayoutDirection method for wx.DC as well.



--
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!


_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users



--
http://kaze.co.il
יש קצה חוט לרעיון שלך

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|

Re: Right to left language support

Robin Dunn
  יהודה wrote:
> it worked!
>
> i hoop this could help someone in the future
>
> text1=wx.StaticText(panel3, -1, hebrewString  ", style=wx.RIGHT)
> text1.SetLayoutDirection(2)

To avoid the magic number in that statement you can use
wx.Layout_RightToLeft.

--
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users