summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 83d8601..f213943 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -183,33 +183,39 @@ void Today::loadPlugins() {
for ( it = list.begin(); it != list.end(); ++it ) {
QInterfacePtr<TodayPluginInterface> iface;
QLibrary *lib = new QLibrary( path + "/" + *it );
qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
qDebug( QString(*it) );
TodayPlugin plugin;
plugin.library = lib;
plugin.iface = iface;
plugin.name = QString(*it);
QString type = (*it).left( (*it).find(".") );
- QStringList langs = Global::languageList();
+
+ // grr, sharp rom does not know Global::languageList();
+ // QStringList langs = Global::languageList();
+ QString tfn = QPEApplication::qpeDir() + "/i18n/";
+ QDir langDir = tfn;
+ QStringList langs = langDir.entryList("*", QDir::Dirs );
+
for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) {
QString lang = *lit;
qDebug( "Languages: " + lang );
QTranslator * trans = new QTranslator( qApp );
QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm";
if ( trans->load( tfn ) ) {
qApp->installTranslator( trans );
} else {
delete trans;
}
}
// find out if plugins should be shown
if ( m_excludeApplets.grep( *it ).isEmpty() ) {
plugin.active = true;
} else {