On Tue Jan 22 13:23:20 2013, GUIDO wrote:
Show quoted text> The problem arises, when you interpolate OS output into your messages
> (or the other way round). Even in a web application you may want to
> interpolate $! (stringified) or the output of POSIX::strftime(). That
> can lead to issues. The OS locale could be set to fr_FR.utf-8 while
you
Show quoted text> get messages for ru_RU.koi8-r.
This bit i didn't understand, so thanks for explaining.
Show quoted text> The globals in Locale::TextDomain and Locale::gettext_pp are caches,
> things that are safe to remember, even under mod_perl.
Ah, that was not clear from the way they are named. Also, how would i
go about clearing those caches?
Show quoted text> If you really want to retrieve translations directly from mo files
that
Show quoted text> is quite easy. Just look at the sources of gettext_pp.pm. I could
even
Show quoted text> extend Locale::Messages::select_package() so that it excepts other
> package identifiers than gettext_pp or gettext_xs. That way you can
> roll your own message retrieval backend (for example derived from
> gettext_pp) that bypasses all setlocale() stuff.
And another thing i didn't realize: L::TD uses mo files to get data
instead of reading from the po files. Since i'm only starting to learn
how gettext operates this wasn't clear to me.
Show quoted text> But the file NEWS does. For traditional reasons, libintl-perl rather
> follows the GNU conventions for filenames, than the Perl ones.
That's very confusing for perl developers though, since sites like
metacpan and search.cpan.org look for files labeled Changes or
ChangeLog to automatically link them. Maybe add a message at the top of
that file to point out the real changelog file?