]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Template/Plugin/T8.pm
CVar->get_configs cached jetzt so, wie es io.pl eh schon tut.
[mfinanz.git] / SL / Template / Plugin / T8.pm
index 79fab96bbb4324b8b05ea493ded3b903a6e7546c..2208ff42fbb79bd8569798f1c44e87ac1fb57f4f 100644 (file)
@@ -3,22 +3,18 @@ package SL::Template::Plugin::T8;
 use Template::Plugin::Filter;
 use base qw( Template::Plugin::Filter );
 
-my $locale = undef;
-
 sub init {
-    my $self = shift;
-
-    $locale ||= Locale->new($main::myconfig{countrycode}, 'all');
+  my $self = shift;
 
-    # first arg can specify filter name
-    $self->install_filter($self->{ _ARGS }->[0] || 'T8');
+  # first arg can specify filter name
+  $self->install_filter($self->{ _ARGS }->[0] || 'T8');
 
-    return $self;
+  return $self;
 }
 
 sub filter {
-    my ($self, $text, $args) = @_;
-    return $locale->text($text, @{ $args || [] });
+  my ($self, $text, $args) = @_;
+  return $::locale->text($text, @{ $args || [] }) || $text;
 }
 
 return 'SL::Template::Plugin::T8';