diff options
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 2696017d2..4889dff70 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -12,6 +12,7 @@ use detect_devices; use partition_table qw(:types); use fsedit; use fs; +use lang; use run_program; use modules; use log; @@ -769,6 +770,26 @@ Do you want to use this feature?'), } } +sub selectLanguage { + my ($in, $lang, $langs) = @_; + $in->ask_from_( + { messages => _("Please, choose a language to use."), + advanced_messages => _("You can choose other languages that will be available after install"), + callbacks => { + focus_out => sub { $langs->{$lang} = 1 }, + }, + }, + [ { val => \$lang, separator => '|', + format => \&lang::lang2text, list => [ lang::list() ] }, + (map {; + { val => \$langs->{$_->[0]}, type => 'bool', disabled => sub { $langs->{all} }, + text => $_->[1], advanced => 1, + } + } sort { $a->[1] cmp $b->[1] } map { [ $_, lang::lang2text($_) ] } lang::list()), + { val => \$langs->{all}, type => 'bool', text => _("All"), advanced => 1 } + ]) and $lang; +} + sub write_passwd_user { my ($prefix, $u, $isMD5) = @_; |