+require '../intl/Sesse::GettextizeTemplates.pm';
+
+require '../config.pm';
+-r '../config.local.pm' and require '../config.local.pm';
+
+# Check for language settings
+my %cookies = fetch CGI::Cookie;
+my $lang = defined($cookies{'language'}) ? $cookies{'language'}->value : undef;
+if (defined($lang) && ($lang eq 'nb_NO' || $lang eq 'nn_NO' || $lang eq 'en_US')) {
+ POSIX::setlocale( &POSIX::LC_CTYPE , $lang . ".UTF-8" );
+ POSIX::setlocale( &POSIX::LC_MESSAGES , $lang . ".UTF-8" );
+} else {
+ POSIX::setlocale( &POSIX::LC_CTYPE , $ccbs::config::lang );
+ POSIX::setlocale( &POSIX::LC_MESSAGES , $ccbs::config::lang );
+}
+Locale::gettext::bindtextdomain("ccbs", "po");
+Locale::gettext::textdomain("ccbs");