Hello.

When gtk.Builder gets a translation for <property translatable="yes"> it
displays it correctly only in UTF-8 locale. C gtk programs are fixed by
adding bind_textdomain_codeset(domain, "utf-8"); I tried to call python
bind_textdomain_codeset, but it didn't help. Here is complete testcase:

#!/usr/bin/python
import gtk
from locale import *
from gettext import bind_textdomain_codeset

setlocale(LC_ALL, '')
bind_textdomain_codeset("libc", "UTF-8")
Builder = gtk.Builder()
Builder.set_translation_domain("libc")
Builder.add_from_string(
"""<?xml version="1.0"?>
<interface><object class="GtkDialog" id="dialog">
<property name="title" translatable="yes">Success</property>
</object></interface>""")
Dialog = Builder.get_object("dialog")
Dialog.resize(300, 100)
Dialog.show()
gtk.main()


-- 
WBR, wRAR (ALT Linux Team)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to