summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-10-15 12:37:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-10-15 12:37:50 +0000
commit3a073373c565e013c265ed8ce195d66f1c3ea4a0 (patch)
treeddc5ef9b4a15e9779e39b46aede0e33d75b4cfb6 /perl-install/lang.pm
parent8ad913dde1837343c88867fc5d83c851e815e653 (diff)
downloaddrakx-3a073373c565e013c265ed8ce195d66f1c3ea4a0.tar
drakx-3a073373c565e013c265ed8ce195d66f1c3ea4a0.tar.gz
drakx-3a073373c565e013c265ed8ce195d66f1c3ea4a0.tar.bz2
drakx-3a073373c565e013c265ed8ce195d66f1c3ea4a0.tar.xz
drakx-3a073373c565e013c265ed8ce195d66f1c3ea4a0.zip
- localedrake:
o do propose "Suisse" after selecting french language (#34675) nb: it was not selected because CH is associated to de_CH whereas it also exists fr_CH. hence country_to_locales()
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r--perl-install/lang.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index fbe28b1f4..555d811a8 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -504,6 +504,17 @@ sub getLANGUAGE {
locale_to_main_locale($lang)));
}
+sub country_to_locales {
+ my ($country) = @_;
+
+ my $locale = c2locale($country) or return;
+
+ uniq($locale, grep {
+ my $h = analyse_locale_name($_) or internal_error();
+ $h->{country} eq $country;
+ } @locales);
+}
+
#-------------------------------------------------------------
#
# IM configuration hash tables