mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Use QLocale::uiLanguages for system language.
This commit is contained in:
@@ -27,13 +27,15 @@ QString SystemVersionPretty() {
|
||||
}
|
||||
|
||||
QString SystemCountry() {
|
||||
QLocale locale;
|
||||
return locale.name().split('_').last();
|
||||
return QLocale::system().name().split('_').last();
|
||||
}
|
||||
|
||||
QString SystemLanguage() {
|
||||
QLocale locale;
|
||||
return locale.name().split('_').first();
|
||||
const auto system = QLocale::system();
|
||||
const auto languages = system.uiLanguages();
|
||||
return languages.isEmpty()
|
||||
? system.name().split('_').first()
|
||||
: languages.front();
|
||||
}
|
||||
|
||||
QDate WhenSystemBecomesOutdated() {
|
||||
|
Reference in New Issue
Block a user