Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Problems using gettext in perl.by cowboy (Friar) |
on Jul 13, 2006 at 19:01 UTC ( [id://561042]=perlquestion: print w/replies, xml ) | Need Help?? |
cowboy has asked for the wisdom of the Perl Monks concerning the following question: I'm having problems getting gettext to work. I've tried both Locale::gettext and Locale::TextDomain. The translation never happens, I always get 'Baz' back. Below is the code for both my attempts. The locale datafile contains a msgid Baz which translates to 'New Baz' /home/cowboy/locale/x/LC_MESSAGES/test.mo Attempt 1 (Locale::gettext)
Second attempt (Locale::TextDomain)
Any help would be greatly appreciated. I'm not tied to these modules, or even gettext if a better alternative is suggested. Update: using strace on the execution of the programs, the first one does not seem to even attempt to look in the directory I specified, instead, trying /usr/lib/locale. The second does a stat on the file, but doesn't actually attempt to open it.
Back to
Seekers of Perl Wisdom
|
|