mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-07 01:22:49 +02:00
load translation based on system locale
this loads the resource that contains translations for the locale the user has set.
This commit is contained in:
parent
a55124ed75
commit
59391e3841
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "tomahawk/tomahawkapp.h"
|
||||
#include <QTranslator>
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
#include "tomahawkapp_mac.h"
|
||||
@ -41,6 +42,12 @@ main( int argc, char *argv[] )
|
||||
try
|
||||
{
|
||||
TomahawkApp a( argc, argv );
|
||||
|
||||
QString locale = QLocale::system().name();
|
||||
|
||||
QTranslator translator;
|
||||
translator.load(QString(":/lang/tomahawk_") + locale);
|
||||
a.installTranslator(&translator);
|
||||
return a.exec();
|
||||
}
|
||||
catch( const std::runtime_error& e )
|
||||
|
Loading…
x
Reference in New Issue
Block a user