- my $acc = I18N::AcceptLanguage->new();
- my %all_langs = map { $_ => 1 } (@LANGUAGES, @DDTP_LANGUAGES);
- my @all_langs = sort keys %all_langs;
- my $http_lang = $acc->accepts( $input->http("Accept-Language"),
- \@all_langs ) || 'en';
- debug( "LANGUAGES=@all_langs header=".
+ my %PO_LANGUAGES = map { $_ => 1 } @LANGUAGES;
+ my %DDTP_LANGUAGES = map { $_ => 1 } @DDTP_LANGUAGES;
+ my $acc = I18N::AcceptLanguage->new(defaultLanguage => 'en');
+ my $ddtp_lang = $acc->accepts( $input->http("Accept-Language"),
+ \@DDTP_LANGUAGES );
+ my $po_lang = $acc->accepts( $input->http("Accept-Language"),
+ \@LANGUAGES );
+ debug( "LANGS=@LANGUAGES DDTP_LANGS=@DDTP_LANGUAGES header=".