Re: Missing labels with national chars in some widgets



Kaixo!

On Tue, Feb 15, 2000 at 10:47:02PM +0100, Rafa Kleger-Rudomin wrote:

> I've noticed following problem with all gtk apps:
> 
> Labels containing any national character are not displayed
> by some widgets (eg there are missing entries in menu 

That is not a problem of Gtk, but of locales definition, and in
particular of LC_CTYPE; if the language you are talking about doesn't use
latin1 encoding you *MUST* have in the program a line:

	setlocale(LC_CTYPE,"");

(or LC_ALL instead of LC_CTYPE). Without it you can't display localized
text. Note that with Gnome programs that isn't necessary; as it is done 
automatically; but pure Gtk+ doesn't (imho it would be better that pure gtk+
do it too).

You need also to #include locale.h and libintl.h in each *.c file where
you will use gettext() (or the _() macros).
Look at http://www.linuxi18n.org/gtk.var, I write a little tutorial on
how to add gettext() to Gtk+ programs.

> Some people I know reported this problem too, some
> others have not encountered this.

Becasue that depends on the charset encoding; it is unoticed by people
using latin1 letters.

> Do you have any suggestions what could cause the problem or how to track
> it down?

it is missing a setlocale for LC_CTYPE (or LC_ALL; which sets all LC_*.
If you use any date/time function; you need LC_TIME also; so using LC_ALL
is generally the best solution).

> Rafa? Kleger-Rudomin (klakier@osi.gda.pl) 
> -- 
> To unsubscribe: mail gtk-i18n-list-request@redhat.com with "unsubscribe"
> as the Subject.

-- 
Ki a vos vye bn,
Pablo Saratxaga

http://www.ping.be/~pin19314/		PGP Key available, key ID: 0x8F0E4975



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