summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-06-01 03:44:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-06-01 03:44:24 +0000
commitf83545cabfa4cc23b333bce333be938d91ab2309 (patch)
tree47408987ee8b8aec80208c9f11024bbbbd74b817 /perl-install/any.pm
parent23b9fd3b4319860f7e2e6eaaa4600e6155c520f0 (diff)
downloaddrakx-f83545cabfa4cc23b333bce333be938d91ab2309.tar
drakx-f83545cabfa4cc23b333bce333be938d91ab2309.tar.gz
drakx-f83545cabfa4cc23b333bce333be938d91ab2309.tar.bz2
drakx-f83545cabfa4cc23b333bce333be938d91ab2309.tar.xz
drakx-f83545cabfa4cc23b333bce333be938d91ab2309.zip
add language selection to finish-install
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 085b3abe7..03b1171be 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -776,6 +776,31 @@ when your installation is complete and you restart your system.")),
}
}
+sub selectLanguage_and_more_standalone {
+ my ($in, $locale) = @_;
+ eval {
+ local $::isWizard = 1;
+ language:
+ # keep around previous settings so that selectLanguage can keep UTF-8 flag:
+ local $::Wizard_no_previous = 1;
+ my $old_lang = $locale->{lang};
+ $in->{locale} = $locale;
+ $locale->{lang} = selectLanguage($in, $locale->{lang});
+ $locale->{IM} = lang::get_default_im($locale->{lang}) if $old_lang ne $locale->{lang};
+ undef $::Wizard_no_previous;
+ selectCountry($in, $locale) or goto language;
+ };
+ if ($@) {
+ if ($@ =~ /^one lang only/) {
+ selectCountry($in, $locale) or $in->exit(0);
+ } elsif ($@ !~ /wizcancel/) {
+ die;
+ } else {
+ $in->exit(0);
+ }
+ }
+}
+
sub selectCountry {
my ($in, $locale) = @_;