Dear All,
I want to display the content of a file which I will be exporting to the module Locale::Maketex t::Lexicon. For example there is a file "/abc/cde.po" and I wan to access this file using the above module.
Please let me know how to display the content of the file where as I am using the CGI environment.
SSS.pm
I use this module inside my CGI file as follows:
program.cgi
Once we get the file handle $lh for SSS.pm, how do we display the content of the file.
Thanks in advance.
I want to display the content of a file which I will be exporting to the module Locale::Maketex t::Lexicon. For example there is a file "/abc/cde.po" and I wan to access this file using the above module.
Please let me know how to display the content of the file where as I am using the CGI environment.
SSS.pm
Code:
package SSS;
use lib '../lib/perl-5.8.3/lib/site_perl';
use base Locale::Maketext;
use Locale::Maketext::Lexicon {
'*' => [Gettext => '../abc/*.po'],
_auto => 1,
_style => 'gettext',
};
use strict;
1;
program.cgi
Code:
(perl)
use CGI;
use SSS;
my $q = new CGI();
my $sf = pot::SF->new; # pot::SF is a user-defined module
my $lang_to_use = get_lang($q->http('Accept-language'), $sf->{LANGUAGES}) ;
$lang_to_use = $sf->{LANG_DEFAULT} if (!defined($lang_to_use));
my $lh = SSS->get_handle($lang_to_use);
Thanks in advance.
Comment