From e284607438b756b5ca8aae4da600aab266aa254d Mon Sep 17 00:00:00 2001 From: kleidis <167202775+kleidis@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:30:54 +0200 Subject: [PATCH] qt: Fix default languege not being set to the main one the system uses --- src/lime_qt/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lime_qt/main.cpp b/src/lime_qt/main.cpp index c9a74c1b7..f60a43e09 100644 --- a/src/lime_qt/main.cpp +++ b/src/lime_qt/main.cpp @@ -3413,8 +3413,9 @@ void GMainWindow::LoadTranslation() { bool loaded; if (UISettings::values.language.isEmpty()) { - // If the selected language is empty, use system locale - loaded = translator.load(QLocale(), {}, {}, QStringLiteral(":/languages/")); + // Use the system's default locale + QLocale defaultLocale = QLocale::system(); + loaded = translator.load(defaultLocale, {}, {}, QStringLiteral(":/languages/")); } else { // Otherwise load from the specified file loaded = translator.load(UISettings::values.language, QStringLiteral(":/languages/"));