diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-03-01 17:56:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-03-01 17:56:32 +0000 |
commit | b4f6f62b291b9ef2ba4f93a4dfff791fd50c7540 (patch) | |
tree | 5dc1c4376baac124b3c223da4d5a73292ce9a1d3 /perl-install/lang.pm | |
parent | 33e516ff5e432a1f76e2d965709c43f3c48fb33d (diff) | |
download | drakx-b4f6f62b291b9ef2ba4f93a4dfff791fd50c7540.tar drakx-b4f6f62b291b9ef2ba4f93a4dfff791fd50c7540.tar.gz drakx-b4f6f62b291b9ef2ba4f93a4dfff791fd50c7540.tar.bz2 drakx-b4f6f62b291b9ef2ba4f93a4dfff791fd50c7540.tar.xz drakx-b4f6f62b291b9ef2ba4f93a4dfff791fd50c7540.zip |
restrict localedrake to installed lang
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r-- | perl-install/lang.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm index bd8eb89ba..34f42f07f 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -432,13 +432,16 @@ my %lang2country = ( #-###################################################################################### sub list { - my ($exclude_non_necessary_utf8) = @_; - if ($exclude_non_necessary_utf8) { + my (%options) = @_; + my @l = @languages; + if ($options{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; + @l = grep { !/UTF-8/ || !$LANGs_non_utf8{lang2LANG($_)} } @l; + } + if ($options{exclude_non_installed_langs}) { + @l = grep { -e "/usr/share/locale/" . lang2LANG($_) . "/LC_CTYPE" } @l; } + @l; } sub lang2text { exists $languages{$_[0]} && $languages{$_[0]}[0] } sub lang2charset { exists $languages{$_[0]} && $languages{$_[0]}[1] } |