Mercurial > hg > sonic-visualiser
comparison main/main.cpp @ 658:86d1f640ae1e
Add choice of interface language to the prefs dialog (in case user is unhappy with system locale)
author | Chris Cannam |
---|---|
date | Tue, 26 Nov 2013 10:35:55 +0000 |
parents | 6d8a76bd91a7 |
children | 17fe7e0c23a1 |
comparison
equal
deleted
inserted
replaced
657:1938702bb3bf | 658:86d1f640ae1e |
---|---|
315 } | 315 } |
316 QApplication::setWindowIcon(icon); | 316 QApplication::setWindowIcon(icon); |
317 | 317 |
318 QString language = QLocale::system().name(); | 318 QString language = QLocale::system().name(); |
319 | 319 |
320 settings.beginGroup("Preferences"); | |
321 language = settings.value("locale", language).toString(); | |
322 settings.endGroup(); | |
323 | |
320 QTranslator qtTranslator; | 324 QTranslator qtTranslator; |
321 QString qtTrName = QString("qt_%1").arg(language); | 325 QString qtTrName = QString("qt_%1").arg(language); |
322 SVDEBUG << "Loading " << qtTrName << "... "; | 326 SVDEBUG << "Loading " << qtTrName << "... "; |
323 bool success = false; | 327 bool success = false; |
324 if (!(success = qtTranslator.load(qtTrName))) { | 328 if (!(success = qtTranslator.load(qtTrName))) { |