I just replied to you in stackoverflow, your solution is right, I copied my answer too:
I created a Translator class to organize and load translations, I have a QVariantMap that holds language name and file name, then when I create my Translator I have to provide the source directory since that is a requirement to load translations, my class also takes care of storing in QSettings last language used.
Now, to answer your question, you can always translate the exact same way as if it was a regular application, on your project file you will have to add something like this:
1 - List all your possible translations
TRANSLATIONS = \
translation_sp.ts \
translation_fr.ts
2 - Run lupdate to generate the actual translation files
lupdate project.pro
3 - Run lrelease
Translate with linguist and create the actual translations, this will generate translation_sp.qm and translation_fr.qm
4 - Deploy translations with your plugin
Once you have the qm files deploy them with your plugin, ideally you could standardize the naming, maybe always using plugin_XX.qm
5 - Load plugin translation in application
To do this you will have to know the path to the translation file and the filename, so if your plugin is installed in the Qt default directories and you standardized the translation filenames this should be simple
qTranslator.load("plugin_XX.qm", "PATH_TO_TRANSLATION_FILE")
app->installTranslator(qtTranslator);
I simplified this in my class, here is the source code if you want to take a look
https://raw.githubusercontent.com/Iktwo/inventory/master/src/translator.cpp
https://raw.githubusercontent.com/Iktwo/inventory/master/src/translator.h
And here's how you use it:
Translator translator(app.data(), "PATH_TO_TRANSLATION");
translator.addTranslation("SP", "plugin_XX.qm");
engine.rootContext()->setContextProperty("translator", &translator);
You can install multiple translators, so it will work for your application and your plugins, when I wrote my class I was not expecting different sources but you can modify so every time you add a translation it will take a 2 letter code for the language, the filename and the path to it.
Hope this helps!