From 28960bf166cb9bf5b89474283fe0fc35e6b6e062 Mon Sep 17 00:00:00 2001 From: Cobalt <60624944+cobalt2727@users.noreply.github.com> Date: Wed, 17 Jun 2026 08:37:55 -0500 Subject: [PATCH] Fix loadTranslation for QT 6 older than 6.7 (#2200) * language fix for QT pre 6.7 haha funny number * be more explicit * make clang-format happy --- src/citra_qt/citra_qt.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/citra_qt/citra_qt.cpp b/src/citra_qt/citra_qt.cpp index 09fe54145..c76c13d28 100644 --- a/src/citra_qt/citra_qt.cpp +++ b/src/citra_qt/citra_qt.cpp @@ -4091,7 +4091,14 @@ void GMainWindow::LoadTranslation() { // selected language option? Current behaviour is better than the issue it fixes, // but not ideal. if (UISettings::values.language.isEmpty()) { - const auto languages = QLocale::system().uiLanguages(QLocale::TagSeparator::Underscore); + QStringList languages; +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) + languages = QLocale::system().uiLanguages(QLocale::TagSeparator::Underscore); +#else + languages = QLocale::system().uiLanguages(); + for (auto& lang : languages) + lang.replace(u'-', u'_'); +#endif for (const auto& lang : languages) { // If the first language found is English, no need to install any translation if (lang == lang_en) {