From 3bfa49f3081e4e2b278093a57382f773f5a5230f Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 17 Jul 2005 13:25:13 +0000 Subject: [PATCH] Set the locale early enough for everything to be translated. --- html/ccbs.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/html/ccbs.pm b/html/ccbs.pm index d3f0721..6dd7b13 100755 --- a/html/ccbs.pm +++ b/html/ccbs.pm @@ -14,6 +14,11 @@ our $start_time; BEGIN { $start_time = [Time::HiRes::gettimeofday()]; + + POSIX::setlocale( &POSIX::LC_CTYPE , "nb_NO.UTF-8" ); + POSIX::setlocale( &POSIX::LC_MESSAGES , "nb_NO.UTF-8" ); + Locale::gettext::bindtextdomain("ccbs", "po"); + Locale::gettext::textdomain("ccbs"); } our $ccbs_dbdebug = 0; @@ -81,11 +86,6 @@ sub process_template { $vars->{'public'} = $ccbs_noadmin; $vars->{'timetogenerate'} = sprintf "%.3f", Time::HiRes::tv_interval($start_time); - POSIX::setlocale( &POSIX::LC_CTYPE , "nb_NO.UTF-8" ); - POSIX::setlocale( &POSIX::LC_MESSAGES , "nb_NO.UTF-8" ); - Locale::gettext::bindtextdomain("ccbs", "po"); - Locale::gettext::textdomain("ccbs"); - my $config = { INCLUDE_PATH => 'templates/', INTERPOLATE => 1, -- 2.39.2