summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-22 13:12:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-22 13:12:31 +0000
commitc1e0b354cf6321a8dbae81a8cb18811ae72eede9 (patch)
tree84553982752b25de47897b9fb895aed24fe5f11d /perl-install/lang.pm
parentc79c5dbe21c5c17eff04213f4ae8d97aaf3f732b (diff)
downloaddrakx-backup-do-not-use-c1e0b354cf6321a8dbae81a8cb18811ae72eede9.tar
drakx-backup-do-not-use-c1e0b354cf6321a8dbae81a8cb18811ae72eede9.tar.gz
drakx-backup-do-not-use-c1e0b354cf6321a8dbae81a8cb18811ae72eede9.tar.bz2
drakx-backup-do-not-use-c1e0b354cf6321a8dbae81a8cb18811ae72eede9.tar.xz
drakx-backup-do-not-use-c1e0b354cf6321a8dbae81a8cb18811ae72eede9.zip
restrict the langs displayed to non utf8 during install
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r--perl-install/lang.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index ea461793c..52c6c968d 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -431,7 +431,15 @@ my %lang2country = (
#- Functions
#-######################################################################################
-sub list { @languages }
+sub list {
+ my ($exclude_non_necessary_utf8) = @_;
+ if ($exclude_non_necessary_utf8) {
+ my %LANGs_non_utf8 = map { lang2LANG($_) => 1 } grep { !/UTF-8/ } @languages;
+ grep { !/UTF-8/ || !$LANGs_non_utf8{lang2LANG($_)} } @languages;
+ } else {
+ @languages;
+ }
+}
sub lang2text { exists $languages{$_[0]} && $languages{$_[0]}[0] }
sub lang2charset { exists $languages{$_[0]} && $languages{$_[0]}[1] }
sub lang2LANG { exists $languages{$_[0]} && $languages{$_[0]}[2] }