From 922386c6a083eb6085b1147a4b1547bfecac8319 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Sat, 10 Nov 2007 22:09:12 -0600 Subject: [PATCH] fix the 'current language' change language display Signed-off-by: Joshua Ferraro --- C4/Languages.pm | 1 + C4/Output.pm | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/Languages.pm b/C4/Languages.pm index c73bd38c71..c90f615cb7 100644 --- a/C4/Languages.pm +++ b/C4/Languages.pm @@ -261,6 +261,7 @@ sub _build_languages_arrayref { for my $language_code (@$all_languages) { if ($language_subtags_hashref->{language} eq $language_code->{'subtag'}) { $language_code->{'language'} = $language; + $language_code->{'language_code'} = $language; $language_code->{'language_script'} = $language_subtags_hashref->{'script'}; $language_code->{'language_region'} = $language_subtags_hashref->{'region'}; $language_code->{'language_variant'} = $language_subtags_hashref->{'variant'}; diff --git a/C4/Output.pm b/C4/Output.pm index e73d1b6b35..e786323bc2 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -118,7 +118,10 @@ sub gettemplate { $language_hashref->{'language_region_description'} = language_get_description($language_hashref->{'language_region'},$lang); $language_hashref->{'language_variant_description'} = language_get_description($language_hashref->{'language_variant'},$lang); - if ($language_hashref->{language_code} eq $language_subtags_hashref->{language}) { + if ($language_hashref->{'language_code'} eq $lang) { + warn "LANG: $lang"; + warn "Code:".$language_hashref->{'language_code'}; + #language_hashref->{language_code} eq $language_subtags_hashref->{language}) { $language_hashref->{current}++; } push @template_languages, $language_hashref; -- 2.39.5