i18n for Cash plugin

Fix broken link inside Operation/AdSpace.pm
Add a method to be used for developing apps with i18n before
i18n is ready.  This will eventually be used as part of a system
to automatically create i18n files from Perl source.
This commit is contained in:
Colin Kuskie 2006-04-18 18:01:42 +00:00
parent ac55cc1e41
commit f6b336a824
4 changed files with 193 additions and 14 deletions

View file

@ -49,6 +49,19 @@ These functions/methods are available from this package:
=cut
#-------------------------------------------------------------------
=head2 echo ( internationalId [ , namespace, language ] )
This method is used to help developers work with i18n before i18n files
have been created. echo simply returns the internationId.
sub echo {
my ($self, $id, $namespace, $language) = @_;
return $id;
}
#-------------------------------------------------------------------
=head2 get ( internationalId [ , namespace, language ] )
@ -89,8 +102,8 @@ sub get {
my $output = eval($cmd);
$self->session->errorHandler->warn("Couldn't get value from ".$cmd." because ".$@) if ($@);
$output = $self->get($id,$namespace,"English") if ($output eq "" && $language ne "English");
$l10nCache{$language}{$namespace}{$id} = $output || $id;
return $output || $id;
$l10nCache{$language}{$namespace}{$id} = $output;
return $output;
}