From f41d617b490546f80ca8b37652b985f71485f8a0 Mon Sep 17 00:00:00 2001 From: ouv Date: Tue, 22 Feb 2011 10:15:33 +0000 Subject: [PATCH] Added improvement made in revision 1.17.2.6 : SALOME internationalization: add textual resources for French language --- src/Qtx/QtxResourceMgr.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Qtx/QtxResourceMgr.cxx b/src/Qtx/QtxResourceMgr.cxx index f1764c024..63c16bf90 100644 --- a/src/Qtx/QtxResourceMgr.cxx +++ b/src/Qtx/QtxResourceMgr.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #ifndef QT_NO_DOM #include #include @@ -2378,6 +2379,14 @@ void QtxResourceMgr::loadLanguage( const bool loadUser, const QString& pref, con else prefixList = parameters( resSection() ); + if ( pref.isEmpty() && lang != "en" ) { + // load Qt resources + QString qt_translations = QLibraryInfo::location( QLibraryInfo::TranslationsPath ); + QTranslator* trans = new QtxTranslator( 0 ); + if ( trans->load( QString("qt_%1").arg( lang ), qt_translations ) ) + QApplication::instance()->installTranslator( trans ); + } + for ( QStringList::ConstIterator iter = prefixList.begin(); iter != prefixList.end(); ++iter ) { QString prefix = *iter; -- 2.39.2