Get language name and country name from QLocale (Linux)

This commit is contained in:
Vitaly Lipatov 2019-06-12 10:16:36 +03:00 committed by John Preston
parent 0c3773486e
commit 9276101809
1 changed files with 6 additions and 2 deletions

View File

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/linux/info_linux.h"
#include <QLocale>
namespace Platform {
QString DeviceModelPretty() {
@ -25,11 +27,13 @@ QString SystemVersionPretty() {
}
QString SystemCountry() {
return QString();
QLocale locale;
return locale.name().split('_').last();
}
QString SystemLanguage() {
return QString();
QLocale locale;
return locale.name().split('_').first();
}
QDate WhenSystemBecomesOutdated() {