fixing some more bugs introduced from the new i18n system

This commit is contained in:
JT Smith 2004-06-27 16:27:36 +00:00
parent 078a5ca108
commit e531d8d5b2
3 changed files with 7 additions and 9 deletions

View file

@ -84,9 +84,12 @@ sub get {
my $cmd = "WebGUI::i18n::".$language."::".$namespace;
my $load = "use ".$cmd;
eval($load);
WebGUI::ErrorHandler::warn($cmd." failed to compile because ".$@) if ($@);
$cmd = "\$".$cmd."::I18N->{'".$id."'}";
my $output = eval($cmd);
return $output || get($id,$namespace,"English");
WebGUI::ErrorHandler::warn("Couldn't get value from ".$cmd." because ".$@) if ($@);
$output = get($id,$namespace,"English") if ($output eq "" && $language ne "English");
return $output;
}