sub format_percent {
my ($self, $var, $places, $skip_zero) = @_;
+ $places ||= 2;
+
return $self->format_amount($var * 100, $places, $skip_zero);
}
}
sub t8 {
- my ($self, $text, $args) = @_;
- $self->{locale} ||= Locale->new($::myconfig{countrycode}, 'all');
- return $self->{locale}->text($text, @{ $args || [] });
+ my ($self, $text, @args) = @_;
+ return $::locale->text($text, @args) || $text;
}
1;