summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-02-23 10:54:56 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-02-23 10:54:56 +0000
commit4c9864e08d1ca96728d98a224ce279edadcb7820 (patch)
tree8fff22653510b4b70fd88e7cf536352097447b4a /perl-install/lang.pm
parent4f76e9c3d00ee7fc519774a4397584c0ca5fd637 (diff)
downloaddrakx-backup-do-not-use-4c9864e08d1ca96728d98a224ce279edadcb7820.tar
drakx-backup-do-not-use-4c9864e08d1ca96728d98a224ce279edadcb7820.tar.gz
drakx-backup-do-not-use-4c9864e08d1ca96728d98a224ce279edadcb7820.tar.bz2
drakx-backup-do-not-use-4c9864e08d1ca96728d98a224ce279edadcb7820.tar.xz
drakx-backup-do-not-use-4c9864e08d1ca96728d98a224ce279edadcb7820.zip
create lang::lang_changed() to ensure {country} is set according to the lang (useful for finish-install where choosing fr gives fr_US)
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r--perl-install/lang.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index d1cde6002..15f5de647 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");