I want to display the content of a file which I will be exporting to the module Locale::Maketext::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
Expand|Select|Wrap|Line Numbers
- 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
Expand|Select|Wrap|Line Numbers
- (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.