I'm about to include the following lines in my epilicious extension to
get the (glade) UI, and other bits, translated:

  import gettext
  import gtk.glade
  try:
      gtk.glade.bindtextdomain('epilicious', '/usr/share/locale')
      gtk.glade.textdomain('epilicious')
      t = gettext.translation('epilicious', '/usr/share/locale')
      _ = t.ugettext
  except Exception, e:
      _ = lambda x : x

Is this the best way of doing it?

/M

-- 
Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
[EMAIL PROTECTED]             Jabber: [EMAIL PROTECTED]
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.

Attachment: pgp8yt9fMAOVC.pgp
Description: PGP signature

_______________________________________________
epiphany-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/epiphany-list

Reply via email to