[pygtk] Internationalization my App

saeed saeed.gnu at gmail.com
Mon Jun 15 23:18:42 WST 2009


To change direction of a gtk.Widget(with name "widget" for example), use:
  widget.set_direction(gtk.TEXT_DIR_RTL)
or
  widget.set_direction(gtk.TEXT_DIR_LTR)

And to change the default direction of all widgets, use:
  gtk.widget_set_default_direction(gtk.TEXT_DIR_RTL)

If your program will have a Persian (or Arabic) interface,
thats difficult to change direction of all widgets seperately.
So you can only change the default direction of PyGTK (in the first of program).
Then direction of all widgets will changed automatically.
So recommended to write this code in the first of program(after
importing gtk and probably detecting language):
  gtk.widget_set_default_direction(gtk.TEXT_DIR_RTL)

On 6/15/09, mahdieh saeed <mahdieh.saeed at gmail.com> wrote:
> Hi every body,
> I used pygtk for my application.I use persian Language for my Application.I
> don't know how can I change direction to RTL.
>
> Please help me,
> Best Regards,
> mahdieh saeed
>


More information about the pygtk mailing list