Fix to test if locale is supported

This commit is contained in:
iliajie
2023-02-11 14:09:17 +02:00
parent 8fbfc5f432
commit 31c63b3e2a

View File

@@ -12913,7 +12913,9 @@ eval {
if (!$@ && $locale_system) {
$locale_system =~ s/\..*//;
$locale_system =~ s/_/-/;
return $locale_system;
my $locales = &list_locales();
return $locale_system
if ($locales->{$locale_system});
}
return $locale_def;
}