diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 2 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 4 | ||||
-rw-r--r-- | perl-install/lang.pm | 8 |
3 files changed, 10 insertions, 4 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index bcfe2d2f4..2b0695d7b 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -848,7 +848,7 @@ sub selectLanguage_and_more_standalone { local $::Wizard_no_previous = 1; my $old_lang = $locale->{lang}; selectLanguage_standalone($in, $locale); - $locale->{IM} = lang::get_default_im($locale->{lang}) if $old_lang ne $locale->{lang}; + lang::lang_changed($locale) if $old_lang ne $locale->{lang}; undef $::Wizard_no_previous; selectCountry($in, $locale) or goto language; }; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index ee12699cd..13ae63365 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -104,9 +104,7 @@ sub selectLanguage { $o->{locale}{langs} ||= { $o->{locale}{lang} => 1 }; if (!exists $o->{locale}{country}) { - my $h = lang::analyse_locale_name(lang::l2locale($o->{locale}{lang})); - $o->{locale}{country} = $h->{country} if $h->{country}; - $o->{locale}{IM} = lang::get_default_im($o->{locale}{lang}); + lang::lang_changed($o->{locale}); } lang::set($o->{locale}, !$o->isa('interactive::gtk')); diff --git a/perl-install/lang.pm b/perl-install/lang.pm index d692b3eca..64d07fcd7 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -983,6 +983,14 @@ sub system_locales_to_ourlocale { $locale; } +sub lang_changed { + my ($locale) = @_; + my $h = analyse_locale_name(l2locale($locale->{lang})); + $locale->{country} = $h->{country} if $h->{country}; + + $locale->{IM} = get_default_im($locale->{lang}); +} + sub read { my ($b_user_only) = @_; my ($f1, $f2) = ("$::prefix$ENV{HOME}/.i18n", "$::prefix/etc/sysconfig/i18n"); |