in reply to Re: libintl.a for Strawberry Perl
in thread libintl.a for Strawberry Perl

I tested Locale::gettext_pp on Windows and it doesn't work, as it (roughly) assumes the system POSIX::setlocale(LC_MESSAGES,"") will return the locale to use, which is not the case for Windows :-(

Replies are listed 'Best First'.
Re^3: libintl.a for Strawberry Perl
by syphilis (Archbishop) on Jan 24, 2019 at 23:18 UTC
    ... it doesn't work, as it (roughly) assumes the system POSIX::setlocale(LC_MESSAGES,"") will return the locale to use, which is not the case for Windows

    The documentation for Locale::gettext indicates that it, too, relies on POSIX::setlocale(LC_MESSAGES,""). (See the SYNOPSIS.)

    Cheers,
    Rob
      You’re right. I finally rewrote for my own usage a gettex_basic module in Pure Perl that does only the very basic of gettext (ignoring plural forms and codesets) which test if we are on Win32 get the locale by a special way (from registry). And it finally fits my need : I use Locale:gettext if LC_MESSAGES is defined and otherwwise, if Win32, get the system value through the registry and convert it to a POSIX compliant language code...
Re^3: libintl.a for Strawberry Perl
by pryrt (Abbot) on Jan 24, 2019 at 19:30 UTC

    That's unfortunate. I'm surprised they don't have a check for that in their test suite. You might want to file a bug report.