Gtk2::GladeXML and i18n



Hi,

I'm trying to use i18n with glade and all strings used in my glade
file aren't translated when the application is running. Although, if I
use gettext() directly from my application with one of the i18n
strings from the glade file I can see the translation printed at the
console. I know that the .mo files are generated properly and that the
adequate translations are there.

I'm using the following code snippet (this is a simplification):

  use Locale::Messages qw (:locale_h :libintl_h);

  my $DOMAIN = 'xacobeo';

  textdomain($DOMAIN);
  bindtextdomain($DOMAIN,  './share/locale');
  my $glade = Gtk2::GladeXML->new('xacobeo.glade', undef, $DOMAIN);


I think that the problem is with the fact that my localization files
are not in /usr/share/locale but in another folder. I've used strace
-e file with my perl script and it shows that glade doesn't look at my
folder for the .mo files, it only takes /usr/share/locale into
account.

Is there a way to tell glade where to look for translations? Or
perhaps is there a better way for using i18n in perl with glade?

-- 
Emmanuel Rodriguez



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