@@ -, +, @@ sublanguage if two sublanguages are installed - Install two language variants (e.g. de-DE and de-CH) - Create OPAC news for each of them - Verify that they are displayed in OPAC as appropriate --- tools/koha-news.pl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) --- a/tools/koha-news.pl +++ a/tools/koha-news.pl @@ -65,12 +65,15 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( # get lang list my @lang_list; my $tlangs = getTranslatedLanguages() ; + foreach my $language ( @$tlangs ) { - push @lang_list, - { - language => $language->{'rfc4646_subtag'}, - selected => ( $new_detail->{lang} eq $language->{'rfc4646_subtag'} ? 1 : 0 ), - }; + foreach my $sublanguage ( @{$language->{'sublanguages_loop'}} ) { + push @lang_list, + { + language => $sublanguage->{'rfc4646_subtag'}, + selected => ( $new_detail->{lang} eq $sublanguage->{'rfc4646_subtag'} ? 1 : 0 ), + }; + } } my $branches = GetBranches; --