New method of translation.
This commit is contained in:
1 parent
220eb6f9ee
commit
45958240f2
4 files changed
+102
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user