summaryrefslogtreecommitdiff
path: root/library/network.cpp
Unidiff
Diffstat (limited to 'library/network.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/network.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/library/network.cpp b/library/network.cpp
index 7d51016..e6d2781 100644
--- a/library/network.cpp
+++ b/library/network.cpp
@@ -15,12 +15,13 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#define QTOPIA_INTERNAL_LANGLIST
21#include "qpe/network.h" 22#include "qpe/network.h"
22#include "qpe/networkinterface.h" 23#include "qpe/networkinterface.h"
23#include "qpe/global.h" 24#include "qpe/global.h"
24#include "qpe/config.h" 25#include "qpe/config.h"
25#include "qpe/resource.h" 26#include "qpe/resource.h"
26#include "qpe/qpeapplication.h" 27#include "qpe/qpeapplication.h"
@@ -415,20 +416,22 @@ NetworkInterface* Network::loadPlugin(const QString& type)
415 if ( !iface ) { 416 if ( !iface ) {
416 QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so"; 417 QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so";
417 QLibrary lib(libfile); 418 QLibrary lib(libfile);
418 if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK ) 419 if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK )
419 return 0; 420 return 0;
420 ifaces->insert(type,iface); 421 ifaces->insert(type,iface);
421 QString lang = getenv( "LANG" ); 422 QStringList langs = Global::languageList();
422 QTranslator * trans = new QTranslator(qApp); 423 for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) {
423 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm"; 424 QString lang = *it;
424 if ( trans->load( tfn )) 425 QTranslator * trans = new QTranslator(qApp);
425 qApp->installTranslator( trans ); 426 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm";
426 else 427 if ( trans->load( tfn ))
427 delete trans; 428 qApp->installTranslator( trans );
428 429 else
430 delete trans;
431 }
429 } 432 }
430 return iface; 433 return iface;
431#else 434#else
432 return 0; 435 return 0;
433#endif 436#endif
434} 437}