Re: Patch for Automated RTL widgets



On Mon, 2 Oct 2000, George wrote:

> On Sat, Sep 30, 2000 at 04:10:22PM -0200, Ali Abdin wrote:
> > I am resending this because apparently my first mail didn't get through
> > (possible due to the gnome.org DNS issues)
> > 
> > Anyway, attached is a patch for gtk_init that checks wether your locale
> > (LC_ALL or LANG) is Arabic or Hebrew, if it is then it will automatically set
> > the widget direction to RTL.
> > 
> > I think this is needed because LTR widgets with Arabic characters is not a
> > very nice thing to look at. You can still run apps the traditional way by
> > unsetting the locale for just that specific app.
> > 
> > This beats the alternative of having to manually set the text direction (by
> > calling gtk_widget_set_default_direction in each and every app that wants to
> > have an RTL direction.
> 
> Note one caveat:
> 
> It doesn't deal with aliases.   For example it would set RTL for
> "LANG=hungarian", and it wouldn't set it for "LANG=hebrew.iso88598", both of
> which are valid locales on my system.

Hmm - I thought locale was always "<lang code>_<country code>" - Oh well, 
I tried to find out more info on the LANG/LC_ALL stuff but couldn't find 
info about it.

> It could be done if g_i18n_* stuff with unaliasing gets stuffed into glib.
> Then you could just check the first two letters of the first string in the
> language list.

Yeah - I would've used g_i18n_* stuff if it was in!!! (I think I 
mentioned this in a private mail to Owen). Any news on the status of that?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]