use CGI ':standard'; # our templating system
foreach my $language (qw(zh_tw en de fr)) {
    open OUT, ">index.html.$language" or die $!;
    print OUT start_html({ title => _("Autrijus.Home") }),
          _("Sorry, this page is under construction."),
          end_html;        
    sub _ { some_function($language, @_) }	# XXX: put L10n framework 	# here
}

Example 1: Using CGI.pm to automatically generate translated pages.

Back to Article