Re: General localization question



Great.  Thanks a lot.  This is exactly what I was looking for, there
probably will be some bugs or errors to catch but when aren't there?  I
agree that if support for many languages can be generalized there is no
point to limit myself or others.  Thanks again.

-Samir Singh

> Kaixo!
>
> and happy new year!
>
> On Fri, Dec 21, 2001 at 12:40:36PM -0800, Samir A. Singh wrote:
>
> > I'm interested in adding localization to my program but I've never used
> > any of the locale stuff in gnome or gtk.  I've been perusing the archives
> > and I noticed this written a while back...
> >
> > > > If somebody wants to write an entry on "How do I make my program
> > > > suitable for international use?" for the GTK+ FAQ, that would be
> > > > appreciated.
> > > > I wrote something like that some time ago;
> > > look at http://www.linuxi18n.org/gtk-en.html
> >
> > Was something like this ever written?  I guess the above link was a
> > project hosted by mandrakesoft.com but it's gone now.
>
> You can still read it on http://chanae.stben.be/pablo/i18n/
>
> > Anybody know a
> > good place to find general info on this stuff.
>
> There are some generic i18n docs, and the KDE docs are useful too; however
> not Gtk specific, I don't know if that has changed since then, but that
> was the reason I wrote those two pages: to keep track of the Gtk specific
> steps needed.
>
> > I may not need to support
> > different character sets,
>
> Don't think in those terms, that is the wrong way.
> You just have to thing in terms of "itnernationalized" or
> "not internationalized".
> With a good toolkit (and Gtk is) and if you follow the proper steps, then
> you, as a programmer, don't have to worry about "charsets", it is done
> automatically by the i18n layer.
>
> > I may just support languages commonly written
> > using english characters, spanish, french, etc.  If that is a much simpler
> > thing to do let me know.  Thanks.
>
> For a Gtk program the only difference between a bad program limited
> only to iso-8859-1 encoding and leaving out in frustration a lot of people
> (including Europeans that wouldn"t be able to use the euro sign) and a good
> i18n'ed program allowing to use cyrillic, greek, unicode, japanese, etc.
> is only (with Gtk 1.2.*):
>
> * calling gtk_set_locale();
> * using *_fontset() instead of *_font() functions (and, if you hardcode some
>   font names in the source, add a fallback ",*" to them).
>
> With a Gnome program you don't even need to call gtk_set_locale();, it is
> done automatically.
>
> So, the only thing you have to do is not force the use of any particular
> font encoding, that's all. and your program will be able to work for all
> languages and encodings supported by the toolkit (that currently (Gtk 1.2.*)
> excludes some complex or right-to-left scripts, for technical reasons
> of the toolkit; with future Gtk 2 it will be supported, and font selection
> and manipulation will be easier and more transparent)
>
> Of course, there are other things to do for an i18n program, but theose
> are common to one only limited to English and German and for one supporting
> any kind of language. So, there is no reason to purposedly limit your
> program.
>
> I put in http://chanae.stben.be/pablo/i18n/gtk-en.html
> the steps to add i18n support to a Gtk and Gnome program.
> And in http://chanae.stben.be/pablo/i18n/gettext-en.html the steps to
> use gettext, and to add the needed things to autoconf and co.
>
> There may be some errors maybe, I did it in an empiric way, out of my own
> experience. For example I learned only recently that setlocale() should
> not be used, but gtk_set_locale() be used instead, otherwise multi-byte
> encodings have width problems.
> I'll appreciate comments and corrections of course.
>
> And the pages could be copied/adapted to official Gtk/Gnome docs if someone
> think they are usefull.
>
> >
> > -Samir Singh
> >
> > _______________________________________________
> > gtk-i18n-list mailing list
> > gtk-i18n-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
>
>

-- 
Samir A. Singh | Junior Engineer
ELC Technologies
1532 State Street Suite C
Santa Barbara, Ca 93101
ssingh elctech com

(805) 884.8300 phn
(805) 884.8339 fax

http://www.elctech.com

-------------------------------------------------------------------------------
Privacy and Confidentiality Notice:
The information contained in this electronic mail message is intended for the
recipients(s) only.  It may contained priviledged and confidential information.
If you are not an intended recipient, you must not copy, forward, distribute or
take any action in reliance on it.  If you have received this electronic mail
message in error, please notify the sender immediately.




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