New method of translation.

This commit is contained in:
Elijah Perrault committed 2011-01-14 21:01:44 -07:00
1 parent 220eb6f9ee
commit 45958240f2
4 files changed
+102

No files matched your search

+11
View File
@@ -11,6 +11,8 @@ package API::Std;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(conf_get trans);
my %LANGE;
# Configuration value getter.
sub conf_get
@@ -49,7 +51,16 @@ sub conf_get
# Translation subroutine.
sub trans
{
my ($id) = @_;
$id =~ s/ /_/g;
if (defined $API::Std::LANGE{$id}) {
return $API::Std::LANGE{$id};
}
else {
$id =~ s/_/ /g;
return $id;
}
}
1;