1
0
Fork 0

GUI: better isValidLocale function

This commit is contained in:
mrexodia 2016-07-13 08:59:54 +02:00
parent 6c9c744ba2
commit 8d71015d08
No known key found for this signature in database
GPG Key ID: D72F9A4FAA0073B4
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}