I am having a lot of trouble getting internationalization to work under
FreeBSD. Does anyone have it working? I wrote a test script (below) that
works fine under command-line PERL but when run under Apache2/mod_perl2
it breaks.



#!/usr/bin/perl -w

use strict;

print "Content-type: text/plain\n\n";


use OpenXPKI::i18n qw( set_locale_prefix set_language get_language
i18nGettext );
use Locale::Messages qw( :locale_h :libintl_h nl_putenv );
use POSIX qw (setlocale);


printf( "Hello\n\n" );

print_env();
print_inc();


my $lang   = 'en_GB';
my $lutf   = "${lang}.UTF-8";
my $domain = 'openxpki';
my $word   = 'I18N_OPENXPKI_CLIENT_HTML_MASON_LOGIN';


set_locale_prefix( "/usr/local/share/locale");
set_language( "en_GB" );


printf( "First try  = %s\n", i18nGettext( $word ));
printf( "Second try = %s\n", dcgettext( $domain, $word, LC_MESSAGES ));
printf( "Third try  = %s\n", gettext( $word ));
printf( "Fourth try = %s\n", dgettext( $domain, $word ));





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
OpenXPKI-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openxpki-users

Reply via email to