title: How to bind a text domain to a local folder for gettext under GTK3
body: <p>With <code>gettext</code> you can either use the default system-wide locale directory, or specify one yourself using <code>bindtextdomain</code>. This is useful when running a program directly from source when the compiled .mo translation files are not available in the system's default location.</p>
  
  <p>In Python you would do this:</p>
  
  <pre><code>import gettext
  from gettext import gettext as _
  gettext.bindtextdomain('nautilus-image-manipulator', '/path/to/mo/folder')
  gettext.textdomain('nautilus-image-manipulator')
  </code></pre>
  
  <p>where <code>/path/to/mo/folder</code> contains the familiar <code>fr/LC_MESSAGES/nautilus-image-manipulator.mo</code> structure. Calls like this:</p>
  
  <pre><code>print _("Delete this profile")
  </code></pre>
  
  <p>return the properly translated string <em>from the local .mo files</em>, thank you very much.</p>
  
  <p>In GTK+2/pygtk, there existed <a href="http://www.pygtk.org/pygtk2reference/class-gladexml.html#function-glade--bindtextdomain"><code>gtk.glade.bindtextdomain</code></a>, but I'm wondering if there is any equivalent in GTK+3/PyGObject.</p>
  
  <p>To give you a specific example, this is how <a href="http://bazaar.launchpad.net/~emilien-klein/nautilus-image-manipulator/trunk/view/head:/nautilus_image_manipulator/helpers.py">Nautilus Image Manipulator;s UI</a> is created from its Glade file:</p>
  
  <pre><code>from gi.repository import Gtk
  builder = Gtk.Builder()
  builder.set_translation_domain('nautilus-image-manipulator')
  builder.add_from_file(ui_filename)
  return builder
  </code></pre>
  
  <p>Parts of the UI that are not built from the Glade file (i.e. set from code) show up properly translated, but the strings from the Glade file still show up in English.</p>
  
  <p>It seems to me that I'm missing a call to some kind of <code>builder.bind_text_domain('nautilus-image-manipulator', '/path/to/mo/folder')</code> before the call to <code>builder.set_translation_domain</code>... Any idea how to perform this?</p>