Permalink
Browse files

fix the 'current language' change language display

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
  • Loading branch information...
1 parent fe1b2e4 commit 922386c6a083eb6085b1147a4b1547bfecac8319 Joshua Ferraro committed Nov 11, 2007
Showing with 5 additions and 1 deletion.
  1. +1 −0 C4/Languages.pm
  2. +4 −1 C4/Output.pm
View
@@ -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'};
View
@@ -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;

0 comments on commit 922386c

Please sign in to comment.