I discovered I wasn't passing the domain to libglade,
so I modified the line to:

g = libglade.GladeXML("foo.glade","foo","foo")

but it still doesn't work.  How do I get it to recognize
the domain?

-- Don


> -----Original Message-----
> From: Allingham, Donald [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 09, 2001 9:40 AM
> To: '[EMAIL PROTECTED]'
> Subject: [pygtk] internationalization with libglade
> 
> 
> I am having some problems getting libglade to recognize 
> translation files.
>  
> I have used glade to generate a strings file, converted the 
> strings file to
> a .po file, made the translations, and compiled the .po file 
> to a .mo file.
> My program binds text domain. The files appear to be correct, 
> because I can
> use gettext within the program to translate the strings.  
> libglade, however,
> doesn't seem to want to translate the strings.  My sample 
> code is below.
> The print _('New File') translates the string properly, but 
> the interface
> keeps the original English.
>  
> Any ideas to what I am doing wrong?
>  
> _____________________________
>  
> import gettext
> import libglade
> import gtk
> import gnome.ui
>  
> gettext.bindtextdomain("foo", "share/locale")
> gettext.textdomain("foo")
> _ = gettext.gettext
>  
> print _('New File')
> g = libglade.GladeXML("foo.glade","foo")
>  
> gtk.mainloop()
>  
> _____________________________
> 
>  
>  
> --
> Don Allingham
> Design Engineer
> Adaptec, Longmont
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
>  
> _______________________________________________
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> 
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to