diff options
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 5eff5c9b2..4abda68be 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -685,8 +685,11 @@ sub selectCountry { my $country = $locale->{country}; my @countries = lang::list_countries(exclude_non_installed => !$::isInstall); - my @best = uniq map { if_((/^\Q$locale->{lang}/ || substr($_, 0, 2) eq substr($locale->{lang}, 0, 2)) - && /.._(..)/, $1) } @lang::locales; + my @best = uniq grep { + my $h = lang::analyse_locale_name($_); + if_($h->{main} eq lang::locale_to_main_locale($locale->{lang}) && $h->{country}, + $h->{country}); + } @lang::locales; @best == 1 and @best = (); my ($other, $ext_country); |