[vlmc-devel] commit: Detect the system locale at startup and set the default language. ( Ludovic Fauvet )
git at videolan.org
git at videolan.org
Tue Apr 13 12:11:29 CEST 2010
vlmc | branch: master | Ludovic Fauvet <etix at l0cal.com> | Tue Apr 13 11:49:20 2010 +0200| [c7c5390948b16a99a039f36898fbb823e402fce4] | committer: Ludovic Fauvet
Detect the system locale at startup and set the default language.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=c7c5390948b16a99a039f36898fbb823e402fce4
---
src/Main/guimain.cpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/Main/guimain.cpp b/src/Main/guimain.cpp
index c6ee2a2..d2ba557 100644
--- a/src/Main/guimain.cpp
+++ b/src/Main/guimain.cpp
@@ -32,6 +32,7 @@
#include "IntroDialog.h"
#include <QApplication>
+#include <QTranslator>
#include <QFile>
#include <QColor>
#include <QPalette>
@@ -52,6 +53,10 @@ VLMCmain( int argc, char **argv )
app.setOrganizationDomain( "vlmc.org" );
app.setApplicationVersion( PROJECT_VERSION );
+ QTranslator appTranslator;
+ appTranslator.load( "vlmc_" + QLocale::system().name(), ":/ts/" );
+ app.installTranslator( &appTranslator );
+
#ifdef Q_OS_WIN
QFile css(":/styles/windows");
More information about the Vlmc-devel
mailing list