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:
parent
ac55cc1e41
commit
f6b336a824
4 changed files with 193 additions and 14 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue