mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 03:45:56 +01:00
uiLanguages returns strings with "-" as separators for language/region; however QTranslator needs "_" separators
This commit is contained in:
parent
3ff5608ca7
commit
4fd45e0028
@ -120,7 +120,10 @@ void LoadTranslation(const QString& prefix, const QString& path,
|
||||
|
||||
#if QT_VERSION >= 0x040800
|
||||
QString system_language = QLocale::system().uiLanguages().empty() ?
|
||||
QLocale::system().name() : QLocale::system().uiLanguages()[0];
|
||||
QLocale::system().name() : QLocale::system().uiLanguages().first();
|
||||
// uiLanguages returns strings with "-" as separators for language/region;
|
||||
// however QTranslator needs "_" separators
|
||||
system_language.replace("-", "_");
|
||||
#else
|
||||
QString system_language = QLocale::system().name();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user