summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r--perl-install/lang.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index a14c7c3ca..c7d8ed25e 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -24,7 +24,14 @@ my %languages = (
1;
-sub list { keys %languages }
+sub list { map { $_->[0] } values %languages }
+sub text2lang {
+ my ($t) = @_;
+ while (my ($k, $v) = each %languages) {
+ $v->[0] eq $t and return $k;
+ }
+ die "unknown language $t";
+}
sub set {
my $lang = shift;