GUI: better isValidLocale function
This commit is contained in:
parent
6c9c744ba2
commit
8d71015d08
|
|
@ -50,7 +50,7 @@ static bool isValidLocale(const QString & locale)
|
|||
{
|
||||
auto allLocales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, QLocale::AnyCountry);
|
||||
for(auto & l : allLocales)
|
||||
if(l.name() == locale)
|
||||
if(l.name() == locale || l.name().replace(QRegExp("_.+"), "") == locale)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue