]> git.sesse.net Git - wloh/blobdiff - www/rating.pl
Support translation of templates via po4a. Add an English translation as an example.
[wloh] / www / rating.pl
index c69d5a7bf2004cfe1ae1fe3eb9b96ba056ffee60..dca62d89b527d0a305ded73cf00950282a5ea337 100755 (executable)
@@ -26,7 +26,7 @@ my $locale = wloh_common::get_locale($cgi);
 
 my $aux_parms = wloh_common::get_auxillary_parameters($dbh, $locale);
 
-POSIX::setlocale(&POSIX::LC_ALL, 'nb_NO.UTF-8');
+wloh_common::set_locale($locale);
 
 my $season = wloh_common::get_max_season($dbh, $locale);
 
@@ -98,7 +98,7 @@ while (my $ref = $q->fetchrow_hashref) {
 }
 
 print CGI->header(-type=>'text/html; charset=utf-8', -expires=>'+5m');
-wloh_common::process_template('rating.xml', {
+wloh_common::process_template('rating', $locale, {
        '#navbar' => wloh_common::get_navbar($cgi, $dbh, $locale),
        'iterations' => $aux_parms->{'num_iterations'},
        'rating-prior-stddev' => sprintf("%.1f", $aux_parms->{'rating_prior_stddev'}),