Bug 120924 - anaconda doesn't seem to get rtl languages right
Summary: anaconda doesn't seem to get rtl languages right
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-04-15 11:35 UTC by Alexander Larsson
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-08-15 16:06:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alexander Larsson 2004-04-15 11:35:10 UTC
Looking at http://people.redhat.com/~katzj/anaconda-farsi.png it seems
like the anaconda UI wasn't properly mirrored, even though the text is
RTL. 

What happens wrt to RTL mirroring in gtk+ is:
At init (in gtk_parse_args) the default direction is set based on the
current language, like this:

    char *e = _("default:LTR");
    if (strcmp (e, "default:RTL")==0) {
      gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
    } else if (strcmp (e, "default:LTR")) {
      g_warning ("Whoever translated default:LTR did so wrongly.\n");
    }

If you change the locale at runtime, after initializing gtk you need
to call gtk_widget_set_default_direction with the correct flags. You
can probably look at dgettext("gtk20", "default:LTR") after you've
changed the language, and use code similar to above to set the direction.

Comment 1 Jeremy Katz 2004-04-15 18:37:48 UTC
Thanks for the complete description of the fix... committed to cvs,
see http://people.redhat.com/~katzj/anaconda-farsi-2.png


Note You need to log in before you can comment on or make changes to this bug.