From 7f1c8fc3ee25ac0f9bfbecd4f973585b66b4e825 Mon Sep 17 00:00:00 2001 From: ouv Date: Thu, 24 Feb 2011 15:33:15 +0000 Subject: [PATCH] To get the latest fix from V6_main (revision 1.17.2.2.8.4) --- src/Qtx/QtxResourceMgr.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Qtx/QtxResourceMgr.cxx b/src/Qtx/QtxResourceMgr.cxx index 63c16bf90..a6bc30ef7 100644 --- a/src/Qtx/QtxResourceMgr.cxx +++ b/src/Qtx/QtxResourceMgr.cxx @@ -2382,8 +2382,14 @@ void QtxResourceMgr::loadLanguage( const bool loadUser, const QString& pref, con if ( pref.isEmpty() && lang != "en" ) { // load Qt resources QString qt_translations = QLibraryInfo::location( QLibraryInfo::TranslationsPath ); + QString qt_dir_trpath; + if ( ::getenv( "QTDIR" ) ) + qt_dir_trpath = QString( ::getenv( "QTDIR" ) ); + if ( !qt_dir_trpath.isEmpty() ) + qt_dir_trpath = QDir( qt_dir_trpath ).absoluteFilePath( "translations" ); + QTranslator* trans = new QtxTranslator( 0 ); - if ( trans->load( QString("qt_%1").arg( lang ), qt_translations ) ) + if ( trans->load( QString("qt_%1").arg( lang ), qt_translations ) || trans->load( QString("qt_%1").arg( lang ), qt_dir_trpath ) ) QApplication::instance()->installTranslator( trans ); } -- 2.39.2