El Dimecres, 10 de juliol de 2013, a les 04:14:19, Sebastian Kügler va escriure: > Hi,
Hi > Example code: > > const QString translationsPath = package->filePath("translations"); > KGlobal::dirs()->addResourceDir("locale", translationsPath); > KLocalizedString::insertCatalog(dataEngineDescription.pluginName()); > > Question: > > How to port to QStandardPaths, i.e. where to insert the translations path? As far as I can read the ki18n code, you can't. All the catalogs are expected to be in const QString relpath = QString::fromLatin1("%1/LC_MESSAGES/%2.mo") .arg(language).arg(name); const QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString::fromLatin1("locale/") + relpath); AFAIK you can't "edit" QStandardPaths nor you can't pass catalog/folder pairs to k18n, so you lost the feature you where using. Cheers, Albert > > Thanks =) _______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel