If the locale is set to C, force english locale

This fixes date formatting as well as count based translations.
This commit is contained in:
Nicolas Werner 2021-11-27 03:05:32 +01:00
parent eb6320862e
commit bd020bb473
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -243,7 +243,8 @@ main(int argc, char *argv[])
app.setFont(font);
QString lang = QLocale::system().name();
if (QLocale().language() == QLocale::C)
QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedKingdom));
QTranslator qtTranslator;
qtTranslator.load(QLocale(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath));